• 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] Detect Level of Ability?

Status
Not open for further replies.
I'm just learning JASS, I'm a beginner of a beginner, and I'm trying to see if I can do a spell in it. Anywayz, I was wondering how to detect the level of an ability. I wasn't sure, so I converted a GUI script to JASS to see it, but it gives this:
JASS:
function Trig_Illusion_Strike_Actions takes nothing returns nothing
    if ( Trig_Illusion_Strike_Func001C() ) then
    else
    endif
It won't work. Do I have to specify the return area or something like that? Plz help! Also, I have another problem:
JASS:
function Trig_Illusion_Strike_Actions takes nothing returns nothing
    if ( Trig_Illusion_Strike_Func001C() ) then
        local unit a = GetTriggerUnit()
        local location b = GetUnitLoc(a)
        local group c = GetUnitsInRangeOfLocAll(500.00, (b))
It says that there is a syntax error in JASS craft and in WE for the:
JASS:
local unit a = GetTriggerUnit()
What did I do wrong there? Plz help! :emote_smile:
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,257
JASS:
[11-04-36]native GetUnitAbilityLevel takes unit whichUnit,integer abilcode returns integer

This native returns the level of a ability.

JASS:
    set a = GetUnitAbilityLevel(u,'A000')
This would set a local integer "a" to the level of the ability 'A000' for the unit "u"
 
Thanx, but I forgot to mention I solved this a long time ago, but thanx... I just used the "GetUnitAbilityLevel" or the "GetUnitAbilityLevelSwapped" majigger, thanx anywayz though...
@Purple-poot: I know all that, I just didn't know it at the time. Also, the endfunction was at the end of the function but I didn't post it because I thought it wasn't very important to the problem...
 
Status
Not open for further replies.
Top