- Joined
- Apr 1, 2010
- Messages
- 289
i have this in my maps header, but the map will not says, expecting endif, but i have one if and one endif could somone please tell me what the problem.
JASS:
//=======================================================
//Header for 2d projectile system
function Collision takes nothing returns nothing
set udg_MS_Collision = 0
set udg_MS_CollisionUnit = LoadUnitHandle(udg_MS,0,GetHandleId(GetTriggeringTrigger()))
set udg_MS_CollidingU = GetTriggerUnit()
set udg_MS_Collision = 1
endfunction
function CP takes player p, real x, real y, real f returns unit
if udg_MS_Group_Count==0 then
set udg_U = CreateUnit(p,'h000',x,y,f)
set udg_T = CreateTrigger()
call TriggerRegisterUnitInRangeSimple( udg_T,60, udg_U)
call TriggerAddAction(udg_T,function Collision)
call SaveTriggerHandle(udg_MS,0,GetHandleId(udg_U),udg_T)
call SaveUnitHandle(udg_MS,0,GetHandleId(udg_T),udg_U)
return udg_U
endif
set udg_U = FirstOfGroup(udg_MS_Group)
set udg_MS_Group_Count = udg_MS_Group_Count - 1
call EnableTrigger(LoadTriggerHandle(udg_MS,0,GetHandleId(udg_U)))
call SetUnitX(udg_U,x)
call SetUnitY(udg_U,y)
call SetUnitFacing(udg_U,f)
call SetUnitOwner(udg_U,p,true)
return udg_U
endfuntion
//=======================================================
Last edited: