- Joined
- Sep 11, 2006
- Messages
- 172
I seem to be having some trouble designating a local player (p) variable in my script.
The error pops up even if i try to declare the variable on the same line that i call from.
I'm very new to Jass and I'm probably missing something totally obvious, but I just cant pick it out yet.
Any help would be greatly appreciated ^w^
JASS:
function InitGlobals takes nothing returns nothing
endfunction
function Trig_To_Mansion_Front_Copy_Actions takes nothing returns nothing
local player p
set local player p=GetOwningPlayer(GetTriggerUnit())
if GetLocalPlayer()==p then
call SetCineFilterTexture("ReplaceableTextures\\CameraMasks\\Black_mask.blp")
call SetCineFilterStartColor(0,0,0,0)
call SetCineFilterEndColor(0,0,0,255)
call SetCineFilterDuration(2) // fades within 2 seconds
call DisplayCineFilter(true)
endif
call TriggerSleepAction( 2 )
call SetUnitPositionLocFacingBJ( GetTriggerUnit(), GetRectCenter(gg_rct_Region_012), bj_UNIT_FACING )
if GetLocalPlayer()==p then
call SetCineFilterStartColor(0,0,0,255)
call SetCineFilterEndColor(0,0,0,0)
call SetCineFilterDuration(2) // fades in within 2 seconds
call DisplayCineFilter(true)
endif
set p=null
endfunction
//===========================================================================
function InitTrig_To_Mansion_Front_Copy takes nothing returns nothing
set gg_trg_To_Mansion_Front_Copy = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_To_Mansion_Front_Copy, gg_rct_Region_006 )
call TriggerAddAction( gg_trg_To_Mansion_Front_Copy, function Trig_To_Mansion_Front_Copy_Actions )
endfunction
The error pops up even if i try to declare the variable on the same line that i call from.
I'm very new to Jass and I'm probably missing something totally obvious, but I just cant pick it out yet.
Any help would be greatly appreciated ^w^