Jump to content
  • Advertisement
Sign in to follow this  
Jesse Dager

Lua and Irrlicht compilation conflicts

This topic is 1411 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

So I have an application that has irrlicht handle graphics, and lua handle the scripting. I've worked extensively with lua before, but am only now diving into irrlicht. Currently I have an application that SHOULD open a window and run a test lua script. When I run the application, it throws a "PANIC: unprotected error in call to Lua API (bad conversion number->int; must recompile Lua with proper settings)." I have recompiled lua several times with several different settings (ansi, LUA_ANSI, and soft float) but nothing seems to work. Then I got the brilliant idea to comment out everything irrlicht, since it's the only difference from my other lua-based project so far. Once commented out, the lua works fine. When the lua is commented out, the irrlicht works fine. Together, it throws an error. 

As far as I've found, the error is being thrown when I call "luaL_openlibs(L)" in the "lua_checkversion()" function. I'm not sure how to fix this, or if lua and irrlicht simply aren't meant to be.

 

Ideas?

Share this post


Link to post
Share on other sites
Advertisement
Been a lot of years since I used Irrlicht, but just offhand, you might want to be sure that if you are using a DirectX device that it is created using D3DCREATE_FPU_PRESERVE. D3ds default behavior is to switch to a lower precision fpu mode which messes up Lua, which still wants to use higher precision. I believe at some point Irrlicht introduced a device creation flag for this.

Share this post


Link to post
Share on other sites

Thanks JTippetts! I was really at a loss as to what it could be. I set the high precision flag in device creation and it worked like a champ!

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!