The 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)

int nInteger 
The integer that will be converted to a hexadecimal string.

See also Edit

  • IntToString() — for converting integers to decimal strings

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.