ShadowSnipe4
New Member
- Reaction score
- 4
I was making a trigger in Jass, and saving it periodicly to make sure i had it right but it came up with the error "Expected Array Index" one the line
The whole code is
Code:
call SetCameraTargetControllerNoZForPlayer( Player (currentPlayer + 1), udg_MoveUnit, 0, 0, false )
The whole code is
Code:
function Trig_First_Person_View_Actions takes nothing returns nothing
local integer currentPlayer = 0
local unit currentUnit = null
loop
set currentUnit = udg_MoveUnit[currentPlayer + 1]
if currentUnit != null then
call SetCameraTargetControllerNoZForPlayer( Player (currentPlayer + 1), udg_MoveUnit, 0, 0, false )
endif
set currentPlayer = currentPlayer + 1
exitwhen currentPlayer > 9
endloop
set currentUnit = null
endfunction
//===========================================================================
function InitTrig_First_Person_View takes nothing returns nothing
set gg_trg_First_Person_View = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_First_Person_View, 0.20 )
call TriggerAddAction( gg_trg_First_Person_View, function Trig_First_Person_View_Actions )
endfunction