|
发表于 2008-7-30 21:20:47
|
显示全部楼层
你用KOOK大人修正过的ID2integer转化了比较一下吧~~
[jass]
function debugS2I takes string targetstr returns integer
local string originstr="..................................!.#$%&'()*+,-./0123456789:;<=>.@ABCDEFGHIJKLMNOPQRSTUVWXYZ[.]^_`abcdefghijklmnopqrstuvwxyz{|}~................................................................................................................................"
local integer strlength=StringLength(targetstr)
local integer a=0 //分部当前数字
local integer b=0 //当前处理字
local integer numx=1 //位权
local integer result=0
loop
exitwhen b>strlength-1
set numx=R2I(Pow(256,strlength-1-b))
set a=1
loop
exitwhen a>255
if SubString(targetstr,b,b+1)==SubString(originstr,a,a+1) then
set result=result+a*numx
set a=256
endif
set a=a+1
endloop
set b=b+1
endloop
return result
endfunction
[/jass]
我晕了,好像不用这么麻烦,直接赋值给整数变量就可以看了~~~~ |
|