Lua Behaving Differently on Seperate Machines

Started by
11 comments, last by drakostar 15 years, 9 months ago
deadstar have u tried debugging in an interactive debugger like Decoda?

I find when i have some runtime issues, it's best to just break into the code and look at all the variables and step through it line by line. If clearly the array is fubar then something must be up with Lua itself, and then u can place checks all over your code (Lua) to check for when and how it gets corrupt.

You can download Decoda from:

http://www.unknownworlds.com/decoda

A helpful tip, if your building Lua as a staic lib ( which i do ) you will want to change the Lua API macro LUA_API extern to LUA_API __declspec(dllexport) that will allow you to hook into release builds with Decoda.

Good Luck!

-ddn
Advertisement
OK, I just started getting the error on my system, so I could actually debug it. It turns out that it was all caused by an uninitialized boolean. So basically, there was a 50% chance that the game would work at all, and I'm very surprised that it has been working on my computer for so long.

Deadstar, I hope you can figure out what the trouble is on yours. Good luck!
My game development blog: http://rykerlabs.com
Quote:Original post by disanti
OK, I just started getting the error on my system, so I could actually debug it. It turns out that it was all caused by an uninitialized boolean. So basically, there was a 50% chance that the game would work at all, and I'm very surprised that it has been working on my computer for so long.


Just an aside, in case you're interested...

Actually, you'll find that boolean types are rarely if ever implemented as a bit. A byte is much more likely, so the odds are 255:1 that an uninitialized bool will be true.

This topic is closed to new replies.

Advertisement