Sign in to follow this  
kwaung

Need help *Lua* function tag problem.

Recommended Posts

Hi, I just finished integrate lua with my engine. And it work fine, no problem using function tag & other OOP stuff. But until I added a call to luaL_dofile() for loading main game script in my main game loop. All my lua OOP ability is gone. Before :> g = CActionSet.new("ActionSetName") :> g:GetName() :> ActionSetName After(call luaL_dofile() in main game loop) :> g = CActionSet.new("ActionSetName") :> g:GetName() :> [string"?"]: attemp to call method 'GetName'(a nil value) If I disable the luaL_dofile() line everything is back to normal. I register all userdata in LUA_REGISTRYINDEX since I had a hard time resgister it to LUA_ENVIRONINDEX. My program terminate after try to register userdata to LUA_ENVIRONINDEX. Appreciate any advices. :) Thanks in advance.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this