DebugIdInteger2IdString
not ratedConverts 4-letter-ids to actual strings.
For example it will convert 'Hpal' to "Hpal"
For example it will convert 'Hpal' to "Hpal"
//============================================================================================================
//
// For more JASS scripts, visit us at http://www.wc3JASS.com
//
//============================================================================================================
function DebugIdInteger2IdString takes integer value returns string
local string charMap = "..................................!.#$%&'()*+,-./0123456789:;<=>.@ABCDEFGHIJKLMNOPQRSTUVWXYZ[.]^_`abcdefghijklmnopqrstuvwxyz{|}~................................................................................................................................."
local string result = ""
local integer remainingValue = value
local integer charValue
local integer byteno
set byteno = 0
loop
set charValue = ModuloInteger(remainingValue, 256)
set remainingValue = remainingValue / 256
set result = SubString(charMap, charValue, charValue + 1) + result
set byteno = byteno + 1
exitwhen byteno == 4
endloop
return result
endfunctionNo comments.