- Joined
- May 21, 2008
- Messages
- 218
JASS:
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Builders_Func001Func001C takes nothing returns boolean
if ( not ( GetPlayerController(udg_players[GetForLoopIndexA()]) == MAP_CONTROL_USER ) ) then
return false
endif
if ( not ( GetPlayerSlotState(udg_players[GetForLoopIndexA()]) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
---------------------------------------------------------------
function Trig_Builders_Get_Player takes integer returns player| This line causes error
---------------------------------------------------------------
return local player p = Player(a)
endfunction
function Trig_Builders_Get_PlayerID takes integer returns integer
return local player pi = GetPlayerId(Player(a))
endfunction
function Trig_Builders_Actions takes nothing returns nothing
local integer a = 0
local integer b = 7
loop
exitwhen a > b
call function Trig_Builders_Get_Player (a)
call function Trig_Builders_Get_PlayerID (a)
if ( Trig_Builders_Func001Func001C() ) then
call CreateUnit( pi, 'e001', GetPlayerStartLocationX(p), GetPlayerStartLocationY(p), 270.00 )
else
call CreateUnit( pi, 'e001', GetPlayerStartLocationX(p), GetPlayerStartLocationY(p), 270.00 )
endif
set a = a + 1
endloop
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_Builders takes nothing returns nothing
set gg_trg_Builders = CreateTrigger( )
call TriggerAddAction( gg_trg_Builders, function Trig_Builders_Actions )
endfunction
Im incredibly noob at JASS so help please.
Used NewGen
Error:
function Trig_Builders_Get_Player takes integer returns player