Is there a "locals" tutorial here

Status
Not open for further replies.
locals are just variables used in the function they r declared in.

here is a full tutorial if tht didnt help u mybe this will
heres is one from hive
https://www.hiveworkshop.com/forums/jass-ai-scripts-tutorials-280/local-variables-34049/

and another one

http://world-editor-tutorials.thehelper.net/variables.php

Note that this is not correct(from tutorial)
JASS:
set local variable name = value
set and local are keywords that never exist together, as local is only for defining the variable and set is for changing values(which you can't do to a variable before defining or in the same line)
 
Note that this is not correct(from tutorial)
JASS:
set local variable name = value
set and local are keywords that never exist together, as local is only for defining the variable and set is for changing values(which you can't do to a variable before defining or in the same line)

The example that immediately follows that code in the tutorial makes it quite clear that the "local variable name"-part is meant to be replaced with the local variable name you are using.

tutorial said:
JASS:
set local variable name = value

Examples: set Nova_Caster = GetTriggerUnit() - [In GUI: Set Nova_Caster = (Triggering Unit)]
 
Status
Not open for further replies.
Back
Top