Joker(Div)
Always Here..
- Reaction score
- 86
Code:
function Trig_Demon_Strength_Actions takes nothing returns nothing
local unit s = GetAttacker()
local unit sc = CreateUnit( GetOwningPlayer(s), 'nzin', GetUnitX(s), GetUnitY(s), 0)
call UnitAddAbility( sc, 'Auhf' )
call SetUnitAbilityLevel(sc, 'Auhf', GetUnitAbilityLevel(s, 'A00I') )
if GetRandomInt(1, 10) == 1) then
call IssueTargetOrder( sc, "unholyfrenzy", s )
endif
call UnitRemoveAbility( sc, 'Auhf' )
call RemoveUnit( sc )
set s = null
set sc = null
endfunction
//===========================================================================
function InitTrig_Demon_Strength takes nothing returns nothing
set gg_trg_Demon_Strength = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Demon_Strength, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddAction( gg_trg_Demon_Strength, function Trig_Demon_Strength_Actions )
endfunction
Jasscraft says
Line 6: Syntax Error
Line 8: Missing Endfunction
Line 8: syntax error
Line 8: Statement outside of function
Line 8: Statement outside of function
Line 9: Undeclared Variable: s
Line 10: Statement outside of function
Line 11: Statement outside of function
Line 12: Undeclared Variable: sc
Line 12: Statement outside of function
Line 13: Statement outside of function
Line 13: Syntax error
Line 13: Statement outside of function
Line 13: Statement outside of function
I cant seem to find what i did wrong