|
这段代码哪里错了?
OWenT_alpha 函数的参数删了改成local就对,换成参数就错
很灵异的说
[codes=jass]
function OWenT_alphaTimer takes nothing returns nothing
local timer tm = GetExpiredTimer()
local unit whichunit = I2U(GetStoredInteger(udg_GC,H2S(tm),"whichunit"))
local integer index = GetStoredInteger(udg_GC,H2S(tm),"index")
local integer bin = GetStoredInteger(udg_GC,H2S(tm),"bin")
local integer end = GetStoredInteger(udg_GC,H2S(tm),"end")
if (IAbsBJ(index)<=10) then
call SetUnitVertexColor(whichunit,255,255,255,end)
call FlushTable(tm)
call PauseTimer(tm)
call DestroyTimer(tm)
else
call SetUnitVertexColor(whichunit,255,255,255,bin+index)
if index>0 then
set index=index-8
else
set index=index+8
endif
endif
set whichunit = null
set tm = null
endfunction
function OWenT_alpha takes unit whichunit real timeused integer beginalpha integer endalpha returns nothing
local timer tm = CreateTimer()
local integer index=endalpha-beginalpha
call StoreInteger(udg_GC,H2S(tm),"whichunit",H2I(whichunit))
call StoreInteger(udg_GC,H2S(tm),"index",index)
call StoreInteger(udg_GC,H2S(tm),"bin",beginalpha)
call StoreInteger(udg_GC,H2S(tm),"end",endalpha)
call TimerStart(tm,timeused*8/I2R(index),true,function OWenT_alphaTimer)
set tm=null
endfunction
[/codes] |
|