|
Line 37:')'missing
Line 37:syntax error
下面代码怎么了- function H2I takes handle h returns integer
- return h
- return 0
- endfunction
- function I2U takes integer i returns unit
- return i
- return null
- endfunction
- function lie takes nothing returns nothing
- local timer tm=GetExpiredTimer()
- local string name=GetStoredString(udg_GC,I2S(H2I(tm)),"Name")
- local integer N=GetStoredInteger(udg_GC,I2S(H2I(tm)),"Number")
- if N>0 then
- call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,1,name+"is handsome!")
- set N=N-1
- call StoreInteger(udg_GC,I2S(H2I(tm)),"Number",N)
- else
- call FlushStoredMission(udg_GC,I2S(H2I(tm)))
- call DestroyTimer(tm)
- endif
- set tm=null
- endfunction
- function text takes string name,integer N returns nothing
- local timer tm=CreateTimer()
- call StoreString(udg_GC,I2S(H2I(tm)),"Name",name)
- call StoreInteger(udg_GC,I2S(H2I(tm)),"Number",N)
- call TimerStart(tm,0.0025,true,function lie)
- set tm=null
- endfunction
- function Mov takes nothing returns nothing
- local timer tm=GetExpiredTimer()
- local integer bu=GetStoredInteger(udg_GC,I2S(H2I(tm)),"Bu")
- local unit u=I2U(GetStoredInteger(Udg_GC,I2S(H2I(tm)),"Unit"))
- if bu>0 then
- set bu=bu-1
- call SetUnitPositionLoc(u,PolarProjectionBJ(GetUnitLoc(u),20,GetUnitFacing(u))
- call StoreInteger(udg_GC,I2S(H2I(tm)),"Bu",bu) )
- else
- call DestroyTimer(tm)
- endif
- set tm=null
- endfunction
- function move takes unit u,integer i returns nothing
- local timer tm=CreateTimer()
- call StoreInteger(udg_GC,I2S(H2I(tm)),"Unit",H2I(u))
- call StoreInteger(udg_GC,I2S(H2I(tm)),"Bu",i)
- call TimerStart(tm,0.1,true,function Mov)
- set tm=null
- endfunction
复制代码 |
|