[JASS] Local Ability Variable Problems.

Status
Not open for further replies.
Level 6
Joined
Jul 2, 2008
Messages
156
Ok, honestly I'm sick of having to ask for help every trigger I decide to convert to JASS script, but I guess that is the price of learning JASS.

My situation:
Basically I need to add an ability to a unit, but which ability I add is dependent on some things, therefore I need the ability to be saved in a local variable.

JASS:
local ability a
    local integer index

    if ( CheckConversionDifficulty(u) >= (GetPlayerTechCount(p, 'R00O', true)) ) then
        call IssueImmediateOrder( u, "stop" )
        if ( CheckConversionDifficulty(u) >= 1 ) then
            set a= 'A000'
        else 
            set a= 'A002'
        endif
    else

I get the syntax problem: "Cannot convert from integer to ability" when I try to set a= an ability Id.

Can someone please say what I'm doing wrong?

TY in advance, as always.
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
ALL rawcodes (units, destructables, items, abilitys, buffs, upgrades) are integers. So Unit-type in GUI is integer in JASS, Item-Type in GUI is integer in JASS,, etc.

I cant even think of any use for the variable types Ability and Buff.. Unit,Item and Destructable are quite obvious, but Ability and Buff i dont know.
 
Status
Not open for further replies.
Top