T.I.L. Torquescript Can Throw Exceptions In Debug Mode

There are no stupid questions, just stupid answers.
1 post Page 1 of 1
Steve_Yorkshire
Posts: 207
Joined: Tue Feb 03, 2015 10:30 pm
 
  by Steve_Yorkshire » Tue Feb 07, 2017 10:39 pm
If only I'd known this 10 years ago I wouldn't have spent all my dev life avoiding debug mode ... :oops:

Image

It's not muh leet haxxor skillz that were to blame - it was having incompatible variables in Torquescript datablocks ...
This is of course something that never occurred to me, so I've spent the last month hunting through my spaghetti code - which these days is the good stuff that is actually commented and makes some semblence of sense - only to have been on the wildest of goosechases.

So let's check the top pic problem with the out of range value of 627/256. Kept calling a stack with explosion.cpp - kept doing it even without my custom changes. Why? Because one of my explosion datablocks had lightStartBrightness set to 50 when I meant 5.0. The maximum limit is actually 20.

Now let's check the bottom problem which has the out of range value of -ALL_THE_BITS_IN_THE_OBSERVABLE_UNIVERSE/64. Now this is player.cpp - which has THREE (count 'em) custom modes of movement. The sort of code which falls out of your pockets and spills everywhere when you trip in the hall.

Image

Failing on head rotations - but I don't actually use head rotations in a twin stick shooter control method. And that was why. PlayerData Torquescript had min/maxLookAngles set to ZERO (because they weren't really in use) so it freaked out when trying to subtract them.

And that was it, all the reasons I could never get debug exe to work for all these years, because I was always looking in my custom code for the issues and not expecting it to throw a wobbly over being past a dodgy script value from a scriptedd datablock. :evil:

And now all is right with the world which comprises of my spagbol C++ and my status as 1337 is confirmed (unless someone else actually looks at my code and then starts laughing, but hey). :P

Image
1 post Page 1 of 1

Who is online

Users browsing this forum: Bing [Bot] and 1 guest