- Joined
- Mar 24, 2011
- Messages
- 1,082
Hello
This question is a mess between GUI and JASS. I am using GUI with custom scripts inbetween lines when needed.
I have this arrayed integer which will store level of ability for a unit I need only for a single loop and thought of making it local
So, I tried making:
Which will get populated inside the loop, but I get an error
Long story short: I want to turn udg_ArrayedVariable[] into a local array of integers, but as I suspect this is impossible/not the correct way.
I suspect that the error occurs because I am required to give a value to the variable ? How wrong am I ?
This question is a mess between GUI and JASS. I am using GUI with custom scripts inbetween lines when needed.
-
Set TempUnitGroup = units in range of point matching unit has ability;
-
Set TempInteger = -1;
-
Unit Group - Pick all units in TempUnitGroup
-
Loop
-
Set TempInteger = TempInteger + 1
-
Set ArrayedInteger[TempInteger] = Level of ability for picked unit
-
-
-
BiggestLevel = ArrayedInteger[0]
-
If TempInteger > 1
-
Loop for Index 0 to TempInteger
-
Set BiggestLevel = Math - Get Max (BiggestLevel, ArrayedInteger[Index+1])
-
-
-
Use BiggestLevel
I have this arrayed integer which will store level of ability for a unit I need only for a single loop and thought of making it local
So, I tried making:
-
Custom script: set udg_TempInt = CountUnitsInGroup(udg_TempUnitGroup)
-
Custom script: local integer ArrayedInteger[udg_TempInteger]
Which will get populated inside the loop, but I get an error
Long story short: I want to turn udg_ArrayedVariable[] into a local array of integers, but as I suspect this is impossible/not the correct way.
I suspect that the error occurs because I am required to give a value to the variable ? How wrong am I ?