找回密码
 点一下
查看: 2072|回复: 6

我的代码怎么了?

[复制链接]
发表于 2009-4-15 23:12:31 | 显示全部楼层 |阅读模式
Line 37:')'missing
Line 37:syntax error


下面代码怎么了
  1. function H2I takes handle h returns integer
  2. return h
  3. return 0
  4. endfunction
  5. function I2U takes integer i returns unit
  6. return i
  7. return null
  8. endfunction
  9. function lie takes nothing returns nothing
  10. local timer tm=GetExpiredTimer()
  11. local string name=GetStoredString(udg_GC,I2S(H2I(tm)),"Name")
  12. local integer N=GetStoredInteger(udg_GC,I2S(H2I(tm)),"Number")
  13. if N>0 then
  14. call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,1,name+"is handsome!")
  15. set N=N-1
  16. call StoreInteger(udg_GC,I2S(H2I(tm)),"Number",N)
  17. else
  18. call FlushStoredMission(udg_GC,I2S(H2I(tm)))
  19. call DestroyTimer(tm)
  20. endif
  21. set tm=null
  22. endfunction
  23. function text takes string name,integer N returns nothing
  24. local timer tm=CreateTimer()
  25. call StoreString(udg_GC,I2S(H2I(tm)),"Name",name)
  26. call StoreInteger(udg_GC,I2S(H2I(tm)),"Number",N)
  27. call TimerStart(tm,0.0025,true,function lie)
  28. set tm=null
  29. endfunction
  30. function Mov takes nothing returns nothing
  31. local timer tm=GetExpiredTimer()
  32. local integer bu=GetStoredInteger(udg_GC,I2S(H2I(tm)),"Bu")
  33. local unit u=I2U(GetStoredInteger(Udg_GC,I2S(H2I(tm)),"Unit"))
  34. if bu>0 then
  35. set bu=bu-1
  36. call SetUnitPositionLoc(u,PolarProjectionBJ(GetUnitLoc(u),20,GetUnitFacing(u))
  37. call StoreInteger(udg_GC,I2S(H2I(tm)),"Bu",bu) )
  38. else
  39. call DestroyTimer(tm)
  40. endif
  41. set tm=null
  42. endfunction
  43. function move takes unit u,integer i returns nothing
  44. local timer tm=CreateTimer()
  45. call StoreInteger(udg_GC,I2S(H2I(tm)),"Unit",H2I(u))
  46. call StoreInteger(udg_GC,I2S(H2I(tm)),"Bu",i)
  47. call TimerStart(tm,0.1,true,function Mov)
  48. set tm=null
  49. endfunction
复制代码
发表于 2009-4-15 23:16:35 | 显示全部楼层
local unit u=I2U(GetStoredInteger(Udg_GC,I2S(H2I(tm)),"Unit"))
大小写不对

call SetUnitPositionLoc(u,PolarProjectionBJ(GetUnitLoc(u),20,GetUnitFacing(u))
call StoreInteger(udg_GC,I2S(H2I(tm)),"Bu",bu) )
这两行建议lz好好数数括号
回复

使用道具 举报

 楼主| 发表于 2009-4-15 23:25:18 | 显示全部楼层
牛啊! 已改正确了!我近视,看不清了
回复

使用道具 举报

 楼主| 发表于 2009-4-15 23:28:16 | 显示全部楼层
右键推土机
回复

使用道具 举报

发表于 2009-4-16 12:46:20 | 显示全部楼层
  [s:187]
输入JassCrft.................
回复

使用道具 举报

 楼主| 发表于 2009-4-16 19:17:43 | 显示全部楼层
function sdfs takes nothing returns nothing
local timer tm=CreateTimer()
.........
call StoreInteger(udg_gc,"Spell","Unit",H2I(GetTriggerUnit()))
call StoreInteger(udg_gc,I2S(H2I(tm)),"Unit",H2I(GetTriggerUnit()))
.......
endfunction
function XXX takes CXCC........
local Timer tm=GetExpiredTimer()
.........
local unit u1=I2U(GetStoredInteger(udg_gc,"Spell","Unit"))
local unit u2=I2U(GetStoredInteger(udg_gc,I2S(H2I(tm)),"Unit"))
...............
endfunction

怎么u1不能传递呢?
而u2 可以传递
回复

使用道具 举报

发表于 2009-4-17 10:59:59 | 显示全部楼层
(udg_gc,"Spell","Unit"))《---只能保存1个,被冲掉了
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-5 17:29 , Processed in 0.210038 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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