• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[JASS] Un-understandable jass error

Status
Not open for further replies.
Level 4
Joined
Dec 14, 2007
Messages
40
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:
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'
.
 
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.
Back
Top