I've compiled my lua code using luac53 and have the bytecode file. The problem is loadfile doesn't seem to want to load it and returns nil.
local func = loadfile("file.txt")//Returns nil
Load also returns nil after the following:
local file = io.open("file.txt", "rb")
local str = file:read("*a")
file:close()
local func = load(str, "bt")//Returns nil
The file is being loaded as a string here, but neither load or loadfile are doing anything. Does anyone know why this is happening?
.txtfile should be a text file of some sort. Sticking compiled Lua bytecode into a "text file" is bad form. - Nicol Bolas