Regga-Voska
New Member
- Reaction score
- 0
Hi, I am new to vJass, as you can see...
But I got a few errors called Undeclared Variables, and may I ask you guys how to fix them?
JASS:
//Move and rotate the picked unit, make the owner of the picked unit face the same angle as the picked unit and also pan the camera to the units location.
function Trig_Execute_Player_Reds_Unit_Functions_Func002Func005A takes nothing returns nothing
call SetCameraFieldForPlayer( GetOwningPlayer(GetEnumUnit()), CAMERA_FIELD_ROTATION, GetUnitFacing(GetEnumUnit()), 0.10 )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), udg_Temp_Point_Red, 0.10 )
endfunction
function Trig_Execute_Player_Reds_Unit_Functions_Func002A takes nothing returns nothing
set udg_Temp_Point_Red = GetUnitLoc(GetEnumUnit())
set udg_Temp_Point_Red_Two = PolarProjectionBJ(udg_Temp_Point_Red, udg_Move_Red, ( GetUnitFacing(GetEnumUnit()) + udg_Rotation_Red ))
call SetUnitPositionLoc( GetEnumUnit(), udg_Temp_Point_Red_Two )
call SetUnitFacingTimed( GetEnumUnit(), ( GetUnitFacing(GetEnumUnit()) + ( udg_Rotation_Red + udg_Bonus_Rotation[1] ) ), 0 )
call ForGroupBJ( udg_Temp_Group_Red, function Trig_Execute_Player_Reds_Unit_Functions_Func002Func005A )
call RemoveLocation (udg_Temp_Point_Red)
call RemoveLocation (udg_Temp_Point_Red_Two)
endfunction
function Trig_Execute_Player_Reds_Unit_Functions_Actions takes nothing returns nothing
set udg_Temp_Group_Red = GetUnitsOfPlayerAndTypeId(Player(0), 039;h000039;)
call ForGroupBJ( udg_Temp_Group_Red, function Trig_Execute_Player_Reds_Unit_Functions_Func002A )
call DestroyGroup (udg_Temp_Group_Red)
endfunction
//Periodic Event "Every 0.02 second"
function InitTrig_Execute_Player_Reds_Unit_Functions takes nothing returns nothing
set gg_trg_Execute_Player_Reds_Unit_Functions = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Execute_Player_Reds_Unit_Functions, 0.02 )
call TriggerAddAction( gg_trg_Execute_Player_Reds_Unit_Functions, function Trig_Execute_Player_Reds_Unit_Functions_Actions )
endfunction
//Done