I use incbined lua via the bmax lua wrapper
the only gottcha is that lua_dofile can't read from the incbin because it handles the io on it's own. To get around this, I use something like
the only gottcha is that lua_dofile can't read from the incbin because it handles the io on it's own. To get around this, I use something like
Local source:String Local file:TStream=ReadFile(filename) If Not file Return False While Not Eof(file) source:+ReadLine(file)+";" Wend luaL_loadbuffer(lua,source,source.length,filename) Local b:Int=lua_pcall(lua,0,0,0) If b logError("Error - "+String.fromCString(lua_tostring(lua,1))) lua_pop(lua,1) EndIf