maxlua with compiled lua file?!

BlitzMax Forums/BlitzMax Programming/maxlua with compiled lua file?!

Blitzbat(Posted 2010) [#1]
Is it possible to execute compiled lua code with maxlua?

I know it works with pub.lua and dofile.

But I have to register Types to programm object oriented..

Are there any solutions?

thanks ;)


Blitzbat(Posted 2010) [#2]
I have figured out how it just work.

I will do a new function for it but here is the quick answer.

Just find the line
If luaL_loadstring(L, _source)


and replace it with

If luaL_loadfile(L, _source)


it works fine ;)


Htbaa(Posted 2010) [#3]
You could also use luaL_loadstring(L, LoadText("file.luc"))


Blitzbat(Posted 2010) [#4]
I have tried it with loadstring and it does not work...