IntToHexString() NWScript command converts an integer to a hexadecimal string. A hexadecimal string has the format "0x########" with each (of the eight) '#' being a hexadecimal digit (one of '0' through '9' or 'a' through 'f'), and it is the string representation of an integer in base 16.
This command can be somewhat useful (and simple) when integers need to be converted to a fixed-length string, but it lacks some utility in that there is no reverse command that will convert a hexadecimal string to an integer. It is generally unsuitable for feedback to a player (as few players understand hexadecimal), but it does have some debugging usefulness when dealing with bit fields.
string IntToHexString (int nInteger
- The integer that will be converted to a hexadecimal string.
See also Edit
- IntToString() — for converting integers to decimal strings