How to convert this code to 1.24b ?
Also i get a jass error (syntax error, unexspected "takes" ?) here and i dont know why =/
JASS:
function SHHandle takes handle s, string n, handle v returns nothing
if v==null then
call FlushStoredInteger(udg_cache,I2S(H2I(s)),n)
else
call StoreInteger(udg_cache, I2S(H2I(s)), n, H2I(v))
endif
endfunction
function SHInt takes handle s, string n, integer v returns nothing
if v==0 then
call FlushStoredInteger(udg_cache,I2S(H2I(s)),n)
else
call StoreInteger(udg_cache, I2S(H2I(s)), n, v)
endif
endfunction
function SHBoolean takes handle s, string n, boolean v returns nothing
if v==false then
call FlushStoredBoolean(udg_cache,I2S(H2I(s)),n)
else
call StoreBoolean(udg_cache, I2S(H2I(s)), n, v)
endif
endfunction
function SHReal takes handle s, string n, real v returns nothing
if v==0 then
call FlushStoredReal(udg_cache, I2S(H2I(s)), n)
else
call StoreReal(udg_cache, I2S(H2I(s)), n, v)
endif
endfunction
function SHString takes handle s, string n, string v returns nothing
if v==null then
call FlushStoredString(udg_cache, I2S(H2I(s)), n)
else
call StoreString(udg_cache, I2S(H2I(s)), n, v)
endif
function GHBoolean takes handle s, string n returns boolean
return GetStoredBoolean(udg_cache, I2S(H2I(s)), n)
endfunction
function GHReal takes handle s, string n returns real
return GetStoredReal(udg_cache, I2S(H2I(s)), n)
endfunction
function GHUnit takes handle s, string n returns unit
return GetStoredInteger(udg_cache, I2S(H2I(s)), n)
return null
endfunction
function FHLocals takes handle s returns nothing
call FlushStoredMission(udg_cache, I2S(H2I(s)) )
endfunction
function RemoveUnitTimed takes unit u, real dur returns nothing
call RemoveTimedEnum.execute(u,dur)
endfunction
function TimedEffectPt takes real x, real y, real duration, string efx returns nothing
local effect fx = AddSpecialEffect(efx, x, y)
local timer t = CreateTimer()
call SHHandle(t, "fx", fx)
call TimerStart(t, duration, false, function EffectDestroy)
set t = null
set fx = null
endfunction
function SETRemove takes nothing returns nothing
local timer t = GetExpiredTimer()
local unit u = GHUnit(t,"u")
local string s = GHString(t,"s")
call SHBoolean(u,s,false)
call FHLocals(t)
call DestroyTimer(t)
set t = null
set u = null
endfunction
Also i get a jass error (syntax error, unexspected "takes" ?) here and i dont know why =/