I ran into a different, more serious issue with files.
Basicly I have this lua (which is heavily trimmed down from the original I was using)
Language: Lua
function GuiLoadSettings()
settings = io.open("config.cfg","r")
if settings~=nil then
for line in settings:lines() do
end
settings:close()
end
end
GuiLoadSettings()
while true do
print("hello world")
emu.frameadvance()
end
and a .cfg file with this content (There is 1 empty line before and after).
bool BoolAllowEdits : true
bool BoolBattle : false
If I run the lua in 1.12.0 or 1.13.0, it outputs:
hello world
hello world
hello world
and if I run it in 2.1.1. or 2.2, it outputs:
NLua.Exceptions.LuaScriptException: bool BoolBattle : false
I'm not sure if it's a bug with Bizhawk or bad code usage on my part.
Please help :)
This is currently the only things stopping my Mario & Luigi script from running in 2.x.
If you comment the
for line in settings:lines() do bit out, it runs fine.
Opened issue:
https://github.com/TASVideos/BizHawk/issues/995