Fast Help!

simonake

New Member
Reaction score
72
I need fast help because my trigger is simple but i can't find the mistake

JASS:
function Cond takes nothing returns boolean
  return GetSpellAbilityId() == 'A001'
endfunction


Tell me this line is wrong, full code below.

JASS:
function Cond takes nothing returns boolean
  return GetSpellAbilityId() == 'A001'
endfunction
function Acts takes nothing returns nothing
endfunction

//===========================================================================
function InitTrig_Miracle takes nothing returns nothing
    set gg_trg_Miracle = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Miracle, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddAction( gg_trg_Miracle, function Cond)
endfunction
 

BlackRose

Forum User
Reaction score
239
Are you sure there is a mistake? WE Syntax Checker doesn't find anything wrong except an undeclared global trigger (But that is normal).
 

simonake

New Member
Reaction score
72
It tells me that a name is wrongly writen, something like this.


»»»»»»»And i have another spell which was working and not anymore. When i add a conditions, which is correct, it doesn't work anymore

wtf? , WE bugged?
 

Azlier

Old World Ghost
Reaction score
461
Post the actual error message you get. Check if there's a function before it that doesn't have an 'endfunction'.

Is this inside a trigger page named Miracle? Do you have other functions with the same name?

call TriggerAddAction( gg_trg_Miracle, function Cond)
Wait... what?
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
JASS:
function Cond takes nothing returns boolean
  return GetSpellAbilityId() == 'A001'
endfunction

function Acts takes nothing returns nothing
endfunction

function InitTrig_Miracle takes nothing returns nothing
    set gg_trg_Miracle = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Miracle, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddAction( gg_trg_Miracle, function Cond)
endfunction


Wtf?

Use the debug version!!
JASS:
call TriggerAddCondition( gg_trg_Miracle, Condition(function Cond))
call TriggerAddAction(gg_trg_Miracle, function Acts)


Action cun put a function that returns things!!!!
If you want to add condition, use TriggerAddCondition!!! :p
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Actually;
Actions can be done in the Conditions.
It's safer that way.

In this instance though, I believe he just made a mistake.

Here:
JASS:
function Cond takes nothing returns boolean
  return GetSpellAbilityId() == 'A001'
endfunction

function Acts takes nothing returns nothing
endfunction

//===========================================================================
function InitTrig_Miracle 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, Acts)
endfunction

Notice this line:
JASS:
call TriggerAddCondition(t, Condition(function Cond))

"Condition()".
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top