Author |
Message |
Xuen
Joined: Wed Apr 29, 2009 5:14 am Posts: 1
|
Overflow?
I was just messing around on bodyladder with Data and his SMG, when a zombie falling from the sky blew up my head! strangely enough... This shot my health up to 999999999!!! What are they using to store the health, a long? Edit: almost forget the pic!
Attachments:
File comment: Go long!
overflow++.JPG [ 31.84 KiB | Viewed 16407 times ]
|
Wed Apr 29, 2009 5:19 am |
|
|
Kallemort
Joined: Tue Aug 21, 2007 2:55 pm Posts: 948
|
Re: Overflow?
It's the Data actor. That is supposed to happen.
|
Wed Apr 29, 2009 8:27 am |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
Re: Overflow?
What he means is that most games would have gone into overflow, bumping it from a ridiculously high number to a ridiculously low one.
|
Wed Apr 29, 2009 11:44 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Overflow?
Pretty sure health is a long signed integer, which gives it a limit from -2147483648 to 2147483647.
|
Thu Apr 30, 2009 12:12 am |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
Re: Overflow?
Hmm... what are the chances of the health being exactly that number?... Does the health integer have limiter code to stop it from going higher or lower than that preset limit? I'd be interested to know what other integers have limits...
|
Thu Apr 30, 2009 11:38 am |
|
|
Flammablezombie
Joined: Wed Jan 14, 2009 7:12 pm Posts: 1525 Location: In between your sister's legs, showing her how to use a... PS3 controller!
|
Re: Overflow?
Try just accepting it. Data is epic. The world just is that way.
|
Thu Apr 30, 2009 10:26 pm |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Overflow?
411570N3 wrote: Hmm... what are the chances of the health being exactly that number?... Does the health integer have limiter code to stop it from going higher or lower than that preset limit? I'd be interested to know what other integers have limits... C++ (like most languages) has a few flavors of variables. Long, unsigned integers are limited to precisely that variable. Any longer and changes have no actual effect. Also, I now challenge someone to get a screenshot of that much negative health.
|
Thu Apr 30, 2009 11:46 pm |
|
|
Aspect
Joined: Mon Apr 28, 2008 1:35 am Posts: 383
|
Re: Overflow?
Grif wrote: Also, I now challenge someone to get a screenshot of that much negative health. haha, you're on
|
Tue May 12, 2009 12:52 am |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
Re: Overflow?
Without lua.
Of course.
|
Tue May 12, 2009 4:25 am |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
Re: Overflow?
You're a bit late, Azukki got a negative value far lower than the normal limit of a long signed integer. And posted a .gif in the Epic Moments Thread.
|
Tue May 12, 2009 8:08 am |
|
|
|