Samael88
Evil always finds a way
- Reaction score
- 181
This is solved!
JassCraft accepts this code and tells me that it is ok. But the game won't accept it:nuts: I can't find anything wrong with it.
+rep to helper
This is how I call it for now:
Custom Script: call Start(loopint)
Custom Script: call variableset(loopint)
I have tried calling it in the map init and in 0.1 sec of gametime.
It just gives me about 34 errors, almost everyone of them is on loopint
JASS:
globals
integer MeteorCount = 0
real array StartingX
real array StartingY
integer array MainBuild
integer array BuildSlots
integer loopint = 0
race array PlayerRaces
integer HumanMain = 039;h006039;
integer OrcMain = 039;o009039;
integer UndeadMain = 039;u007039;
integer NightElfMain = 039;h006039;
endglobals
function variableset takes nothing returns nothing
loop
exitwhen loopint == 12
set StartingX[loopint] = GetStartLocationX(loopint)
set StartingY[loopint] = GetStartLocationY(loopint)
set PlayerRaces[loopint] = GetPlayerRace(Player(loopint))
set loopint = loopint + 1
endloop
endfunction
function Start takes nothing returns nothing
set loopint = 0
loop
exitwhen loopint==12
if PlayerRaces[loopint] == RACE_HUMAN then
call CreateUnit(Player(loopint), HumanMain, StartingX[loopint], StartingY[loopint], 270)
endif
if PlayerRaces[loopint] == RACE_ORC then
call CreateUnit(Player(loopint), OrcMain, StartingX[loopint], StartingY[loopint], 270)
endif
if PlayerRaces[loopint] == RACE_UNDEAD then
call CreateUnit(Player(loopint), UndeadMain, StartingX[loopint], StartingY[loopint], 270)
endif
if PlayerRaces[loopint] == RACE_NIGHTELF then
call CreateUnit(Player(loopint), NightElfMain, StartingX[loopint], StartingY[loopint], 270)
endif
set loopint= loopint + 1
endloop
endfunction
JassCraft accepts this code and tells me that it is ok. But the game won't accept it:nuts: I can't find anything wrong with it.
+rep to helper
This is how I call it for now:
Custom Script: call Start(loopint)
Custom Script: call variableset(loopint)
I have tried calling it in the map init and in 0.1 sec of gametime.
It just gives me about 34 errors, almost everyone of them is on loopint