• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[JASS] Local Declaration blablabla?

Status
Not open for further replies.
Level 24
Joined
Nov 9, 2006
Messages
2,558
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