K this is what my scripting code exactly looks like
function B642I takes string s returns integer
local integer idx = StringLength(s)
local integer val = 0
local integer mul = 0
local integer i
local string ch
loop
exitwhen idx < 1
set ch = SubStringBJ(s, idx, idx)
set i = 0
loop
exitwhen (i > StringLength(udg_base) - 1)
if ( ch == udg_basearr ) then
set val = val + i * R2I(Pow(I2R(StringLength(udg_base)), I2R(mul)))
set mul = mul + 1
else
endif
set i = i + 1
endloop
set idx = idx - 1
endloop
return val
endfunction
function I2B64F takes integer i, integer digits returns string
local integer val = 0
local integer pass = 6
local string str = ""
local boolean start = false
loop
exitwhen pass < 0
set val = i / R2I(Pow(I2R(StringLength(udg_base)), I2R(pass)))
if (val>0 or start or pass<digits) then
set str = str + udg_basearr[val]
set i = i - val * R2I(Pow(I2R(StringLength(udg_base)), I2R(pass)))
set start = true
else
endif
set pass = pass - 1
endloop
return str
endfunction
function I2B64 takes integer i returns string
return I2B64F(i,0)
endfunction
function I2CB64 takes integer i returns string
return udg_basearr
endfunction
function CodeParseString takes string str returns nothing
local integer idx = 1
local integer i
local string ch
loop
exitwhen idx > StringLength(str)
set ch = SubStringBJ(str, idx, idx)
set i = 0
loop
exitwhen ( ( i > StringLength(udg_base) - 1 ) or ( ch == udg_basearr ) )
set i = i + 1
endloop
set udg_buf[idx-1] = i
set idx = idx + 1
endloop
endfunction
function GetStringChecksum takes string str, integer size, integer key returns string
local integer idx = 1
local integer val = 0
local integer tmp
local integer pass
local string s = ""
local integer i
local string ch
loop
exitwhen idx > StringLength(str)
set ch = SubStringBJ(str, idx, idx)
set i = 0
loop
exitwhen ( ( i > StringLength(udg_base) - 1 ) or ( ch == udg_basearr ) )
set i = i + 1
endloop
set val = ModuloInteger(val * StringLength(udg_base) + i, key)
set idx = idx + 1
endloop
set pass = size - 1
set idx = 0
loop
exitwhen pass < 0
set tmp = udg_power2[6*pass]
set s = s + I2CB64( udg_base_size - 1 - val / tmp )
set val = val - val / tmp * tmp
set idx = idx + 1
set pass = pass - 1
endloop
return s
endfunction
function CodeAddChecksum takes integer size, integer crc_keysize, integer crc_key returns integer
local integer val = 0
local integer tmp = 0
local integer idx = 1
local integer pass = 0
set idx = 0
loop
exitwhen idx == crc_keysize
set udg_buf[size+idx] = udg_base_size-1
set idx = idx + 1
endloop
set val = 0
set idx = 0
loop
exitwhen idx >= size+crc_keysize
set val = ModuloInteger(val * udg_base_size + udg_buf[idx], crc_key)
set idx = idx + 1
endloop
set pass = crc_keysize - 1
set idx = size
loop
exitwhen pass < 0
set tmp = udg_power2[6*pass]
set udg_buf[idx]= udg_buf[idx] - val / tmp
set val = val - val / tmp * tmp
set idx = idx + 1
set pass = pass - 1
endloop
return crc_keysize
endfunction
function CodeGetChecksum takes integer size, integer crc_keysize, integer crc_key returns integer
local integer val = 0
local integer idx = 0
loop
exitwhen idx >= size
set val = ModuloInteger(val * udg_base_size + udg_buf[idx], crc_key)
set idx = idx + 1
endloop
return val
endfunction
function bnot takes integer val, integer bits returns integer
local integer idx = bits - 1
local integer res = 0
loop
exitwhen idx < 0
if ( val / udg_power2[idx] == 0 ) then
set res = res + udg_power2[idx]
else
set val = val - val / udg_power2[idx] * udg_power2[idx]
endif
set idx = idx - 1
endloop
return res
endfunction
function bxor takes integer v1, integer v2, integer bits returns integer
local integer idx = bits - 1
local integer res = 0
local integer a
local integer b
loop
exitwhen idx < 0
set a = v1 / udg_power2[idx]
set b = v2 / udg_power2[idx]
if ( a != b ) then
set res = res + udg_power2[idx]
else
endif
set v1 = v1 - a * udg_power2[idx]
set v2 = v2 - b * udg_power2[idx]
set idx = idx - 1
endloop
return res
endfunction
function bor takes integer v1, integer v2, integer bits returns integer
local integer idx = bits - 1
local integer res = 0
local integer a
local integer b
loop
exitwhen idx < 0
set a = v1 / udg_power2[idx]
set b = v2 / udg_power2[idx]
if ( a == 1 ) then
set res = res + udg_power2[idx]
set v1 = v1 - udg_power2[idx]
set v2 = v2 - b * udg_power2[idx]
else
if ( b == 1 ) then
set res = res + udg_power2[idx]
set v2 = v2 - udg_power2[idx]
else
endif
endif
set idx = idx - 1
endloop
return res
endfunction
function band takes integer v1, integer v2, integer bits returns integer
local integer idx = bits - 1
local integer res = 0
local integer a
local integer b
loop
exitwhen idx < 0
set a = v1 / udg_power2[idx]
set b = v2 / udg_power2[idx]
if ( a == 1 ) then
set v1 = v1 - udg_power2[idx]
if ( b == 1 ) then
set res = res + udg_power2[idx]
set v2 = v2 - udg_power2[idx]
else
endif
else
set v2 = v2 - b * udg_power2[idx]
endif
set idx = idx - 1
endloop
return res
endfunction
function bshl takes integer val, integer arg returns integer
set val = val * udg_power2[arg]
return val
endfunction
function bshr takes integer val, integer arg returns integer
set val = val / udg_power2[arg]
return val
endfunction
function Trig_Kill_Unwanted_Units_Actions takes nothing returns nothing
local group tempGroup=CreateGroup()
local unit nextUnit
local player typingPlayer=GetTriggerPlayer()
call GroupEnumUnitsOfPlayer(tempGroup,typingPlayer, null)
loop
set nextUnit=FirstOfGroup(tempGroup)
exitwhen nextUnit==null
call GroupRemoveUnit(tempGroup, nextUnit)
call RemoveUnit(nextUnit)
endloop
call DestroyGroup(tempGroup)
set tempGroup=null
set nextUnit=null
set typingPlayer=null
endfunction
At the bottom is where the script u made starts