Level data storage and loading reccomendation?

BlitzMax Forums/BlitzMax Programming/Level data storage and loading reccomendation?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

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

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