YAY! Theres this tool in the actual Windows LUA Distribution called: bin2c
Its only but the source of it, so i messed with it a bit to print the Array of bytes to a file, thus converting the LUA to C, so ican use the:
luaL_loadbuffer(lua_State *L, const char *buff, size_t sz,
const char *name);
Call to convert those bytes to C via the intrepter...
what im asking here though, is... In order for me to use this, do i have to include all of the LuaPlayer source and what not?
Or just make sure i can complie what LuaPlayer was complied with...
I think there is 1 more function im looking for... since i heard u must use the lua_dobuffer to actually get it running...
Any thoughts on converting LUA to C anybody? Besides old fashion way?
Convert LUA to C! IT WORKS!!!!!!!!
Yeah, supposedly you can pre-compile your lua scripts and load them at run-time. But really, nine times out of ten wouldnt it be easiest (and most likely safer) to just convert it manually to c?ufoz wrote:It's probably storing some form of compiled lua bytecode, I thought this was always possible if you didn't want to keep text scripts around? It's been a while since I touched the lua sdk... (obviously you still need the interpreter/environment, duhh)