简体   繁体   English

<eof>预计接近“结束”

[英]<eof> expected near 'end'

I'm using these files in my gaming server, and every time I add a new player model, I get 我在游戏服务器中使用这些文件,每次添加新的播放器型号时,

这个错误

[ERROR] lua/autorun/server/fastdlskins.lua:938: '<eof>' expected near 'end'
  1. unknown - lua/autorun/server/fastdlskins.lua:0

I also get a similar error when I add an add-on to a different file 当我将加载项添加到其他文件时,我也会收到类似的错误

img

 [ERROR] lua/autorun/server/workshopitems.lua:55: '<eof>' expected near 'end'
   1. unknown - lua/autorun/server/workshopitems.lua:0

I usually just have to put an 'end' after the code, but I don't see what else I'm required to do. 通常,我只需要在代码后加上一个“结尾”,但是我看不到我还需要做什么。 I don't have any loops running (I think), so I'm not closing any of those out. 我没有任何循环在运行(我认为),因此我没有关闭任何循环。 Not sure what to do. 不知道该怎么办。

As Egor said, remove the extra end at the end of the files. 正如叶戈尔说,删除多余的end在文件的结尾。

end is only used to close blocks for functions and loops, like } in C-like languages. end仅用于关闭函数和循环的块,例如使用C语言编写的} The end at the file is not closing anything, and is thus invalid syntax. 文件end没有关闭任何内容,因此语法无效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM