I really need help regarding my first jass script.
After reading a lot of tutorials, I decided to start off with something simple.
And there was only one error! But I don't know how to fix it.
this is what I did:
and mistake is:
Line 14: Undeclared variable: gg_trg_Take
How do I declare it then?
After reading a lot of tutorials, I decided to start off with something simple.
And there was only one error! But I don't know how to fix it.
this is what I did:
JASS:
//custom trigger
function Take_Actions takes nothing returns nothing
local unit a = GetAttackedUnitBJ()
local unit b = GetAttacker()
local location boom = GetUnitLoc(b)
call KillUnit(a)
call AddSpecialEffectLocBJ(GetUnitLoc(b), "Abilites\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl")
endfunction
//initializing event
function InitTrig_Take takes nothing returns nothing
set gg_trg_Take = CreateTrigger( )
14 call TriggerRegisterAnyUnitEventBJ( gg_trg_Take, EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddAction( gg_trg_Take, function Take_Actions)
endfunction
and mistake is:
Line 14: Undeclared variable: gg_trg_Take
How do I declare it then?
Last edited by a moderator: