PDA

View Full Version : [JASS] Simple Jass Question


Dragon_Lancer
07-22-2008, 11:58 PM
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 (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)

GhostWolf
07-23-2008, 01:01 AM
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:

function Trig_spell_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'ANsb'
endfunction