lua-loadfile

Lua loadfile not finding a file

北慕城南 提交于 2019-12-24 07:39:17
问题 I had some lua code with the following line: JSON = loadfile("JSON.lua")() The file JSON.lua is in the same directory as the lua code that line came from. This code worked for me for a while, and then, without my changing either the lua source, or the JSON.lua, or permission of any of the files, or the directory from where I was running the lua code, I started getting a nil error on that line. (I simply recall NO relevant changes that could have any impact on the lua code.) Adding an assert