Hi
pls help me to find the mistake. Even Jasscraft doesnt find anything but the we shuts down when i try to test the map.
thx
glhf
pls help me to find the mistake. Even Jasscraft doesnt find anything but the we shuts down when i try to test the map.
thx
JASS:
globals
integer array playertierlvl
endglobals
function settierlvl takes player pl returns nothing
if GetUnitName(GetTriggerUnit()) == "custom_O005" then
set playertierlvl[GetPlayerId(pl)] = 1
endif
if GetUnitName(GetTriggerUnit()) == "custom_H000" then
set playertierlvl[GetPlayerId(pl)] = 0
endif
endfunction
function gettierlvl takes player pl returns string
local string tierlvlu
if playertierlvl[GetPlayerId(pl)] == 1 then
set tierlvlu = "custom_O000"
endif
if playertierlvl[GetPlayerId(pl)] == 0 then
set tierlvlu = "custom_H002"
endif
return tierlvlu
endfunction
function tier1spawn takes player pl returns nothing
if IsPlayerSlotState(pl, PLAYER_SLOT_STATE_PLAYING) == true then
call CreateNUnitsAtLoc( 1, UnitId(gettierlvl(pl)),pl, GetPlayerStartLocationLoc(pl), bj_UNIT_FACING )
endif
endfunction
function spawn takes nothing returns nothing
call tier1spawn(Player(0))
call tier1spawn(Player(1))
call tier1spawn(Player(2))
call tier1spawn(Player(3))
call tier1spawn(Player(4))
call tier1spawn(Player(5))
call tier1spawn(Player(6))
call tier1spawn(Player(7))
call tier1spawn(Player(8))
call tier1spawn(Player(9))
call tier1spawn(Player(10))
call tier1spawn(Player(11))
endfunction
glhf