- Joined
- Sep 16, 2008
- Messages
- 47
JASS:
scope Spell initializer Init
//===========================================================================
private function Act takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 0.01, "Test" )
endfunction
//===========================================================================
private function Cond takes nothing returns boolean
return GetSpellAbilityId() == 'A000'
endfunction
//===========================================================================
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t, Condition(function Cond))
call TriggerAddAction(t, function Act)
endfunction
endscope
The only thing i am interested in is how to fix it?
Because i would like to use globals i need scope, once i am trying to create any trigger with scope map is not loading.
What is wrong in this simple code?