- 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.
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.
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.