How to interpret those words?

D

dadads

Guest
Pardon my noobness.

But I have seen JASS scripts in which unit-types,ability-types are defined as being an integer. But strangely though, the integers are defined as letters such as 'A00l','Bf00', etc.

When I tried outputting these letters in the game, I got numbers like "1002302019"

How do I interpret these numbers into numeric form?
i.e. What is 'A00l' in numeric?
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
Jass supports more than 1 integer number format, afaik base 10 (normal numbers), octal, hexadecimal and some sort of ASCII number representation.

Easiest way to calculate the base 10 numbers is to display it as a text message:
Code:
call BJDebugMsg('A00l')

But, there is realy no need to do this, the vaule is the same no matter what base you use.
 
D

dadads

Guest
Ctrl + D, for seeing values of spells/units/buff/etc in their "true form", right?

I actually wanted to interpret these numbers to see if I can give spells to a unit by entering it from player chat.

thx alot, anyways.

It's probably some kind of base-62 numeric.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> some kind of base-62 numeric

Hm?

'ABCD' = ((ascii(A) * 256 + ascii(B)) * 256 + ascii(C)) * 256 + ascii(D)

Where "ascii" is the character value as seen in the rather famous ASCII table:
ascii(A) = 65
ascii(a) = 97
ascii(0) = 48
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top