找回密码
 点一下
查看: 918|回复: 4

Syntax Error,unexpected:"takes"?什么意思啊。

[复制链接]
发表于 2013-10-26 22:58:09 | 显示全部楼层 |阅读模式
本帖最后由 feiruzhou 于 2013-11-12 23:01 编辑

如题保存地图的时候提示:Syntax Error,unexpected:"takes"?

发表于 2013-10-26 23:18:30 | 显示全部楼层
本帖最后由 kp1997 于 2013-10-26 23:36 编辑

函數參數錯誤或者你哪裏寫錯字
回复

使用道具 举报

发表于 2013-10-26 23:41:23 | 显示全部楼层
takes 多余了

话说把整个错误提示全部截图截出来,记得点一下那个错误提示让代码移到出错的那行
回复

使用道具 举报

 楼主| 发表于 2013-10-27 07:43:05 | 显示全部楼层
本帖最后由 feiruzhou 于 2013-10-27 07:52 编辑

已经解决了,不过很奇怪,我就发一下吧!

function kongzhong takes nothing returns nothing
local timer tm=GetExpiredTimer()
if(udf_airs>0) then
if (udg_Playing[1] == true) then
set bj_lastCreatedUnit=CreateUnitAtLoc( Player(11), udg_UnitsAir[udg_Wave],  udg_Points[1], 90.00 )
call SetUnitPathing( GetLastCreatedUnit(), false )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_TempGroup[1] )
call SetUnitUserData( GetLastCreatedUnit(), 101 )
call IssuePointOrderLoc( GetLastCreatedUnit(), "move", udg_GWjingongdian[GetUnitUserData(GetLastCreatedUnit())] )
endif
if (udg_Playing[2] == true) then
set bj_lastCreatedUnit=CreateUnitAtLoc( Player(11), udg_UnitsAir[udg_Wave],  udg_Points[2], 90.00 )
call SetUnitPathing( GetLastCreatedUnit(), false )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_TempGroup[2] )
call SetUnitUserData( GetLastCreatedUnit(), 201 )
call IssuePointOrderLoc( GetLastCreatedUnit(), "move", udg_GWjingongdian[GetUnitUserData(GetLastCreatedUnit())] )
endif
if (udg_Playing[3] == true) then
set bj_lastCreatedUnit=CreateUnitAtLoc( Player(11), udg_UnitsAir[udg_Wave],  udg_Points[3], 90.00 )
call SetUnitPathing( GetLastCreatedUnit(), false )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_TempGroup[3] )
call SetUnitUserData( GetLastCreatedUnit(), 301 )
call IssuePointOrderLoc( GetLastCreatedUnit(), "move", udg_GWjingongdian[GetUnitUserData(GetLastCreatedUnit())] )
endif
if (udg_Playing[4] == true) then
set bj_lastCreatedUnit=CreateUnitAtLoc( Player(11), udg_UnitsAir[udg_Wave],  udg_Points[4], 90.00 )
call SetUnitPathing( GetLastCreatedUnit(), false )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_TempGroup[4] )
call SetUnitUserData( GetLastCreatedUnit(), 401 )
call IssuePointOrderLoc( GetLastCreatedUnit(), "move", udg_GWjingongdian[GetUnitUserData(GetLastCreatedUnit())] )
endif
set udg_airs=udg_airs-1
else
call DestroyTimer(tm)
endif
endfunction
function shuaf takes nothing returns nothing
local timer tm=CreateTimer()
call TimerStart(tm,0.1,true,function kongzhong)
set tm=null
endfunction
问题我已经找到了。是Timer里条用的函数忘记endfunction了,但是YD的提示错误
的那行居然是function shuaf takes nothing returns nothing,提示的错误信息是:Syntax Error,unexpected:"takes"?我怎么看这行都没错,后来放到JassCraft检测了一下才发现是kongzhong这个函数忘记endfunction了
回复

使用道具 举报

发表于 2013-10-27 19:36:37 | 显示全部楼层
可能YD那裡以為你上一個函數是和下一個連著然後就認為你宣布函數那條是多餘了。。
不過為何只彈takes那問YD?
算了既然解決了也沒必要深究。。
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-4 10:44 , Processed in 0.171429 second(s), 23 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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