A little question about local variables

kallieblakie

New Member
Reaction score
5
What is the maximum number of local variables that a function can have?

JASS:
    local timer Loop = GetExpiredTimer()
    local unit arrow = GetHandleUnit(Loop, "arrow")
    local real Angle = GetHandleReal(Loop, "Angle")
    local integer Range = GetHandleInt(Loop, "Range")
    local real Speed = GetHandleReal(Loop, "Speed")
    local integer PlayerNo = GetHandleInt(Loop, "PlayerNo")
    local real distanceCurrent = GetHandleReal(Loop, "distanceCurrent")
    local location C = GetUnitLoc(arrow)
    local location Next
    local boolexpr b = Condition(function Arrow_Filter)
    local real x 
    local real y
    local group g = CreateGroup()


I've got this number of local variables in a function, and when I try to add one more, WE shuts down. $%^&*($%^&


any idea?
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
If there is a limit then it's much higher than the number you have.

The standard WE have a bad habit to shut down for a lot of different kinds of syntax errors (I suppose that it closes when you save and not at the very moment you add the new line?), post the entire function as it looks with the new line and we'll see if we can find something.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top