- Joined
- Aug 2, 2006
- Messages
- 346
This code is in the 'custom script code' part of the map.
When I disable the function call to it, the map does not crash, but when active, the map locks up then shortly afterwards, crashes. I'm thinking it might have to do with an infinite loop...
JASS:
function findFirstPlayer takes nothing returns nothing
local integer x = 0
loop
exitwhen x >= 13
if (GetPlayerSlotState(ConvertedPlayer(x)) == PLAYER_SLOT_STATE_PLAYING) and (GetPlayerController(ConvertedPlayer(x)) == MAP_CONTROL_USER) then
set x = 13
set udg_firstPlayer = ConvertedPlayer(x)
else
set x = x + 1
endif
endloop
endfunction
When I disable the function call to it, the map does not crash, but when active, the map locks up then shortly afterwards, crashes. I'm thinking it might have to do with an infinite loop...
Last edited by a moderator: