PDA

View Full Version : Too many HCs crashes ZC (very minor)



Binx
04-23-2016, 07:50 PM
I was testing a scripted boss for my quest, decided to max out my HP via cheat menu. Wasn't sure on the cap, so i just added 999999 HCs, expecting that it would either auto-cap it to the max the engine could handle, or return an error telling me to make the number an integer between 1 and whatever the cap is. Instead it gave me this:

http://i.imgur.com/ZLRI1Wm.png

Then promptly crashed. I doubt anyone will ever cause this error during an actual playthrough, but yeah, it's there. Whether I hit abort, retry or ignore, it crashes. "This program has stopped working." with the options to either close the program, or search online, then close the program.

Tamamo
04-24-2016, 09:41 AM
Take note when you set Heart Containers your probably setting HP too. 16 HP per HC.
999999 * 16 = 15999984

Yeah of course it would crash. That goes beyond the max for the type HP uses.

Binx
04-24-2016, 01:37 PM
Programming 101, if assigning a value to a dialog box crashes the program, you auto-cap the max integer or otherwise prevent the dialogue box from assigning a number it can't handle. You see it all the time, even in ZC and ZQ "Please use a number between 1-255(or whatever the maximum integer the system can handle)". Not including something that prevents crashing in these situations is a bug, it is a failure in the program's design. Now, if you want to point out that it's a very *minor* bug that most people will never come across, and thus isn't high priority, that's a fair point, but to act like it should be an expected aspect of the program is just asinine and lazy.

Saffith
07-14-2016, 01:24 AM
Turns out it does cap the value, just not quite correctly. It caps the value at 65536 HP, which in an unsigned short int becomes 0, causing a subsequent assert(low<=high) to fail.
Fixed.