Romek
Super Moderator
- Reaction score
- 964
I was just looking around in the MPQ, and found a text document (Which is actually a single trigger, with an Init_Trig function. Although most of the functions are completely useless) loaded with Debug functions by Blizzard.
I tried calling one and it didn't work, so instead, I copied it into the editor, and it worked perfectly.
I found an ID2S function which is much shorter than any current one I've seen (I searched). It works (Tested)
Credits to Blizzard
This could be very useful
I tried calling one and it didn't work, so instead, I copied it into the editor, and it worked perfectly.
I found an ID2S function which is much shorter than any current one I've seen (I searched). It works (Tested)
JASS:
function DebugIdInteger2IdString takes integer value returns string
local string charMap = ".................................!.#$%&039;()*+,-./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
endfunction
Credits to Blizzard
This could be very useful