• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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