• 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.

[JASS] Local Declaration blablabla?

Status
Not open for further replies.
Level 24
Joined
Nov 9, 2006
Messages
2,561
Didnt know where to put this since its made with GUI, but the errors come from custom scripts.
The problem is that i really dont know what this means and i understand very little of using custom scripts or writing them, but it is to remove leaks which can be critical in a loop of 0.03.
The red dots shows the errors.
2euic9j.jpg
 
Level 2
Joined
Feb 24, 2007
Messages
37
You can only declear locals at the beginning of a function. So in GUI its right after actions and at some other places depending on the trigger. This is because some GUI actions create an whole new function(Like Unit Group - Pick every unit in group and do actions).
 
Level 9
Joined
Mar 25, 2005
Messages
252
If you really need to use locals change parts like this:
  • Actions
    • ...
    • Custom script: local location loc = GetUnitLoc(udg_ShurikenUnits[1])
    • ...
to look like this:
  • Actions
    • Custom script: local location loc
    • ...
    • Custom script: set loc = GetUnitLoc(udg_ShurikenUnits[1])
    • ...
this way the locals are declared at the beginning even though you're not assigning anything to them at that point
 
Status
Not open for further replies.
Top