Просто использовать I2S не выйдет потому что 'a1B2' не преобразовывается напрямую в ASCII эквиваленту, преобразование происходит по следующей формуле.
Code (Original)
globals
string array sOutput
endglobals
function InitStringArray takes nothing returns nothing
set sOutput['0'] = "0"
set sOutput['1'] = "1"
set sOutput['2'] = "2"
set sOutput['3'] = "3"
set sOutput['4'] = "4"
set sOutput['5'] = "5"
set sOutput['6'] = "6"
set sOutput['7'] = "7"
set sOutput['8'] = "8"
set sOutput['9'] = "9"
set sOutput['a'] = "a"
set sOutput['b'] = "b"
set sOutput['c'] = "c"
set sOutput['d'] = "d"
set sOutput['e'] = "e"
set sOutput['f'] = "f"
set sOutput['g'] = "g"
set sOutput['h'] = "h"
set sOutput['i'] = "i"
set sOutput['j'] = "j"
set sOutput['k'] = "k"
set sOutput['l'] = "l"
set sOutput['m'] = "m"
set sOutput['n'] = "n"
set sOutput['o'] = "o"
set sOutput['p'] = "p"
set sOutput['q'] = "q"
set sOutput['r'] = "r"
set sOutput['s'] = "s"
set sOutput['t'] = "t"
set sOutput['u'] = "u"
set sOutput['v'] = "v"
set sOutput['w'] = "w"
set sOutput['x'] = "x"
set sOutput['y'] = "y"
set sOutput['z'] = "z"
set sOutput['A'] = "A"
set sOutput['B'] = "B"
set sOutput['C'] = "C"
set sOutput['D'] = "D"
set sOutput['E'] = "E"
set sOutput['F'] = "F"
set sOutput['G'] = "G"
set sOutput['H'] = "H"
set sOutput['I'] = "I"
set sOutput['J'] = "J"
set sOutput['K'] = "K"
set sOutput['L'] = "L"
set sOutput['M'] = "M"
set sOutput['N'] = "N"
set sOutput['O'] = "O"
set sOutput['P'] = "P"
set sOutput['Q'] = "Q"
set sOutput['R'] = "R"
set sOutput['S'] = "S"
set sOutput['T'] = "T"
set sOutput['U'] = "U"
set sOutput['V'] = "V"
set sOutput['W'] = "W"
set sOutput['X'] = "X"
set sOutput['Y'] = "Y"
set sOutput['Z'] = "Z"
endfunction
function modulo takes integer dividend, integer divisor returns integer
return dividend - (dividend/divisor)*divisor
endfunction
function raw2s takes integer raw returns string
local string s = ""
loop
set s = sOutput[modulo(raw,256)] + s
set raw = raw/256
exitwhen raw==0
endloop
return s
endfunction
Code (Compressed)
globals
string array sOutput
endglobals
function InitStringArray takes nothing returns nothing
set sOutput['0'] = "0"
set sOutput['1'] = "1"
set sOutput['2'] = "2"
set sOutput['3'] = "3"
set sOutput['4'] = "4"
set sOutput['5'] = "5"
set sOutput['6'] = "6"
set sOutput['7'] = "7"
set sOutput['8'] = "8"
set sOutput['9'] = "9"
set sOutput['a'] = "a"
set sOutput['b'] = "b"
set sOutput['c'] = "c"
set sOutput['d'] = "d"
set sOutput['e'] = "e"
set sOutput['f'] = "f"
set sOutput['g'] = "g"
set sOutput['h'] = "h"
set sOutput['i'] = "i"
set sOutput['j'] = "j"
set sOutput['k'] = "k"
set sOutput['l'] = "l"
set sOutput['m'] = "m"
set sOutput['n'] = "n"
set sOutput['o'] = "o"
set sOutput['p'] = "p"
set sOutput['q'] = "q"
set sOutput['r'] = "r"
set sOutput['s'] = "s"
set sOutput['t'] = "t"
set sOutput['u'] = "u"
set sOutput['v'] = "v"
set sOutput['w'] = "w"
set sOutput['x'] = "x"
set sOutput['y'] = "y"
set sOutput['z'] = "z"
set sOutput['A'] = "A"
set sOutput['B'] = "B"
set sOutput['C'] = "C"
set sOutput['D'] = "D"
set sOutput['E'] = "E"
set sOutput['F'] = "F"
set sOutput['G'] = "G"
set sOutput['H'] = "H"
set sOutput['I'] = "I"
set sOutput['J'] = "J"
set sOutput['K'] = "K"
set sOutput['L'] = "L"
set sOutput['M'] = "M"
set sOutput['N'] = "N"
set sOutput['O'] = "O"
set sOutput['P'] = "P"
set sOutput['Q'] = "Q"
set sOutput['R'] = "R"
set sOutput['S'] = "S"
set sOutput['T'] = "T"
set sOutput['U'] = "U"
set sOutput['V'] = "V"
set sOutput['W'] = "W"
set sOutput['X'] = "X"
set sOutput['Y'] = "Y"
set sOutput['Z'] = "Z"
endfunction
function raw2s takes integer raw returns string
local string s = ""
loop
set s = sOutput[raw-(raw/256)*256] + s
set raw = raw/256
exitwhen raw==0
endloop
return s
endfunction
От автора
Интеджер можно же так и записать. 'A000' это число, и 'A' это число. Ещё 0xAcF или 10 это число.Принцип простой, каждый разряд равкода содержится какой-то 256-изначный инт. Всё полностью аналогично 10-ичной системе. 256-еричному '0' соответствует 48, 'A' - 65 и так далее. В общем, смотрите таблицу ASCII символов
Ред. abidin
Ред. MpW
например в базе должны быть указаны
'I00 ' = 1227894816 dec = 0x49303020 hex
калькулятор можно проверить
тема варкрафт 3 сам составляет порядок равкодов. и ни разу не видел чтобы ставил таких символы (препинания, и пробелы). это может создать трудности при каких-то расчетах. Но можно самим вставить эти знаки при создании объекта.
"
'
\
Все остальные ошибки вызывать не должны.
Ред. MpW
\" - в коде обозначают двумя знаками, при компиляции будет выглядеть как ". эти два знака означают кавычки ", иначе вар ругает (это если вписать в строку " " " тк эти кавычки открывает строку, и их нужно закрыть. Не впишешь норм в "<строку>" так ' <число>' эти кавычки)
\' - эти два знака должны означать ' , в строку норм вписывается знак " ' ", а вот как число попробуй через слэш ' \' ', или пиши сразу 39
'\\', так как при компиляции у вас будет '\'