Advertisement Jump to content
Sign in to follow this  
kwaung

Need help *Lua* function tag problem.

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

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!