简体   繁体   English

Lua编译错误“ do”预计在“ [”附近

[英]Lua Compiling Error 'do' expected near '['

I have a Lua file that I decompiled using unluac. 我有一个使用unluac反编译的Lua文件。 When I try to recompile the files without any changes I get the following error: 当我尝试重新编译文件而不进行任何更改时,出现以下错误:

lua: main.lua:647: 'do' expected near '[' lua:main.lua:647:预计在'['附近执行'do'

I really do not know the problem here, as the while do statement follows the correct format. 我真的不知道这里的问题,因为while do语句遵循正确的格式。 The error is on line 647 as stated above. 该错误是如上所述的第647行。

Source is here: 来源在这里:

Full Pastebin Source 完整的Pastebin来源

Expressions like while {}[1] do and if {}[1].parentFolderName then are invalid because of {}[1] reference. while {}[1] do表达式以及if {}[1].parentFolderName then都是无效的,因为有{}[1]引用。 It needs to be ({})[1] . 它必须是({})[1] It's probably a result of some sort of automated processing, but you should be able to fix it manually. 这可能是某种自动化处理的结果,但是您应该能够手动修复它。

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

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