Jump to content
  • Advertisement
Sign in to follow this  

Need help *Lua* function tag problem.

This topic is 4401 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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!