• 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] Simple Jass Question

Status
Not open for further replies.
Level 5
Joined
Jul 16, 2008
Messages
67
JASS:
function Trig_spell_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'ANsb' ) ) then
        return false
    endif
    return true
endfunction

I need help. it says that on the first line says i need a initilization in it (
JASS:
function --> InitTrig_spell_Condition takes nothing returns nothing
) I want it so it only works when a unit casts an ability. (if confusing please say so)
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Couldn't quite get what you want, ask, say, or whatever that was, but you should use "return statement" instead of "if condition return true else return false", for example:
JASS:
function Trig_spell_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'ANsb'
endfunction
 
Status
Not open for further replies.
Top