| 02-06-2009, 05:43 AM | #1 |
I am recieving hundreds of errors relating to the section below. All six functions are from the custom script section, and are placed there in that order. I am using the JASS NewGen Pack, but the errors are being picked up by the default World Editor syntax checker (can't use JassHelper to do it since it's a campaign). JASS:function ALength takes nothing returns integer local integer index = 1 local integer length loop exitwhen index == 10 if (udg_ActionQueue[index] != 0) then set length = length + 1 endif set index = index + 1 endloop return length endfunction function APush takes nothing returns nothing local integer index = 2 local integer length = ALength() loop exitwhen index == length + 1 set udg_ActionQueue[index - 1] = udg_ActionQueue[index] set index = index + 1 endloop set udg_ActionQueue[length] = 0 endfunction unction AAdd takes integer index returns boolean local integer length = ALength() if (length >= 9) then return false else set udg_ActionQueue[length + 1] = udg_Battle_UnitNumber[index] return true endif endfunction function OLength takes nothing returns integer local integer index = 1 local integer length loop exitwhen index == 5 if (udg_OrderQueue[index] != 0) then set length = length + 1 endif set index = index + 1 endloop return length endfunction function OPush takes nothing returns nothing local integer index = 2 local integer length = OLength() loop exitwhen index == length + 1 set udg_OrderQueue[index - 1] = udg_OrderQueue[index] set index = index + 1 endloop set udg_OrderQueue[length] = 0 endfunction function OAdd takes integer index returns boolean local integer length = OLength() if (length >= 4) then return false else set udg_OrderQueue[length + 1] = udg_Battle_UnitNumber[index] return true endif endfunction |
| 02-06-2009, 07:11 AM | #2 |
For starters your function AAdd doesn't have an 'f' at the beginning, this will cause 1 syntax error. |
| 02-06-2009, 07:20 AM | #3 |
Wow, well spotted, that fixed all 494 syntax errors. JASS is strange sometimes. Thanks! |
| 02-06-2009, 07:24 AM | #4 |
I'm good like that. |
