• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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,258
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