- Joined
- Jul 1, 2008
- Messages
- 1,314
Hey Guys,
i wrote a trigger in jass, that isnst working. It always tells me, that it needs an endif in function DestructableFinder. The whole function is marked as wrong multiple times. Sometimes he wants a name.
udg_Spielheld and the other globals are defined at map init.
Here:
Please help me, would be so great
Btw: German Comments, i know
Edit: JassCraft sometimes says, there is a syntax Error in Line
i wrote a trigger in jass, that isnst working. It always tells me, that it needs an endif in function DestructableFinder. The whole function is marked as wrong multiple times. Sometimes he wants a name.
udg_Spielheld and the other globals are defined at map init.
Here:
JASS:
function DestructableConditions takes destructable Temp nothing returns boolean
// Baum Vergleich
if GetDestructableTypeId(Temp) == 'B00F' or GetDestructableTypeId(Temp) == 'B00G' or GetDestructableTypeId(Temp) == 'B00E' then
return true
endif
return false
endfunction
function DestructableFinder takes nothing returns nothing
local destructable Temp = GetEnumDestructable()
if DestructableConditions(Temp) then
// wenn kein baum da ist, dann tu nichts
set Temp = null
endif
if Temp == null then
set udg_Kamera_Hw_CurrentCam = 0
set udg_Kamera_3rdCam_Display = true
set udg_Kamera_Lockon = true
set udg_Kamera_Static = false
else
set udg_Kamera_3rdCam_Display = false
set udg_Kamera_Lockon = true
set udg_Kamera_Static = false
set udg_Kamera_Hw_CurrentCam = 23
endif
// Debug-Msg
call DisplayTextToForce(GetPlayersAll(),GetDestructableName(Temp))
set Temp = null
endfunction
function Trig_Kamera_Wald_System_Actions takes nothing returns nothing
local location L = GetUnitLoc(udg_Spielheld)
// //=============================================================================
// KameraZoom im Wald, radius = 300, Bäume = Waldbaum 1-3
// //=============================================================================
call EnumDestructablesInCircleBJ(300.00,L, function DestructableFinder)
call RemoveLocation(L)
set L = null
endfunction
//===========================================================================
function InitTrig_Kamera_Wald_System takes nothing returns nothing
set gg_trg_Kamera_Wald_System = CreateTrigger( )
call DisableTrigger( gg_trg_Kamera_Wald_System )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_Kamera_Wald_System, Player(0) )
call TriggerAddAction( gg_trg_Kamera_Wald_System, function Trig_Kamera_Wald_System_Actions )
endfunction
Please help me, would be so great
Btw: German Comments, i know
Edit: JassCraft sometimes says, there is a syntax Error in Line
JASS:
call EnumDestructablesInCircleBJ(300.00,L, function DestructableFinder)