• 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] String to spellability ID?

Status
Not open for further replies.
Level 18
Joined
Apr 15, 2004
Messages
1,396
Ive been trying to convert a string to a spellability ID the 4 integerletter code but I cannot figure out how to do so.

I tried,
Code:
        set udg_itemnameidcode = SubStringBJ(udg_Itembase[udg_rowp[udg_pagenumber]], ( StringLength(udg_Itembase[udg_rowp[udg_pagenumber]]) - 7 ), ( StringLength(udg_Itembase[udg_rowp[udg_pagenumber]]) - 4 ))

        set udg_spells = S2I(udg_itemnameidcode)

        set udg_itemnameidcode2 = SubStringBJ(udg_Itembase[udg_rowp[udg_pagenumber]], ( StringLength(udg_Itembase[udg_rowp[udg_pagenumber]]) - 3 ), StringLength(udg_Itembase[udg_rowp[udg_pagenumber]]))

        set udg_spells_attackspeed = S2I(udg_itemnameidcode2)

which takes item Longsword A00AA00V
and chops the end of its name into
A00A
A00V
the S2I converts it to an integer so it should be a usable spell ID right?

and the spell longsword is A00A while its swingspeed modifier is spellid A00V.

And when i use the:

Code:
        Unit - Add spells to Hero
              Unit - Add spells_attackspeed to Hero

it will not give the ability to the guy! i know it works because if i do it manually it does.
but i cannot get it to use the string to apellID.

Please help.
 
Status
Not open for further replies.
Top