• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Is there a "locals" tutorial here

Status
Not open for further replies.
Level 21
Joined
Mar 27, 2012
Messages
3,232
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
http://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.
Top