• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] Un-understandable jass error

Status
Not open for further replies.
Level 4
Joined
Dec 14, 2007
Messages
41
JASS:
function Trig_Fire_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'A003' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Fire_Actions takes nothing returns nothing //<<<------Error herre
    call CasterCastAbility(GetOwningPlayer(GetSpellAbilityUnit()),'A001',"thunderbolt",GetAttachedUnit(GetSpellAbilityUnit()),"target",true)
    call CleanAttachedVars(GetSpellAbilityUnit())

//===========================================================================
function InitTrig_Fire takes nothing returns nothing
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Fire, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Fire, Condition( function Trig_Fire_Conditions ) )
    call TriggerAddAction( gg_trg_Fire, function Trig_Fire_Actions )
endfunction


i get the error
Code:
Syntax error
 
Last edited by a moderator:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
You fail to end one of the functions with a endfunction.

Also are you sure InitTrig_Fire was the function name that was automatically generated for the trigger? As other wise it is calling a function that does not exist when the map is loading.

Also simplify the condition to just return
JASS:
return GetSpellAbilityId() == 'A003'
.
 
Level 6
Joined
Jun 30, 2006
Messages
230
This is what the doctor meant:
JASS:
function Trig_Fire_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A003'
endfunction
 
Status
Not open for further replies.
Top