Sign in to follow this  

Need help *Lua* function tag problem.

This topic is 4093 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

This topic is 4093 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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