找回密码
 点一下
查看: 797|回复: 2

关于这段JASS

[复制链接]
发表于 2009-1-1 19:32:34 | 显示全部楼层 |阅读模式
这段代码哪里错了?
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]
 楼主| 发表于 2009-1-1 19:36:39 | 显示全部楼层
关键是function OWenT_alpha 出错
另外用到的函数是一些转型函数和GC的游戏缓存+
[codes=jass]
function FlushTable takes handle lable returns nothing
           call FlushStoredMission(udg_GC,H2S(lable))
endfunction
[/codes]
回复

使用道具 举报

 楼主| 发表于 2009-1-1 20:34:27 | 显示全部楼层
刚刚解决了,是逗号问题呵呵
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-7-21 12:24 , Processed in 0.071179 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表