FsPassengers Forums
points turned negative - Printable Version

+- FsPassengers Forums (http://www.fspassengers.com/forum)
+-- Forum: FsPassengers (http://www.fspassengers.com/forum/forumdisplay.php?fid=3)
+--- Forum: FsPassengers Support (http://www.fspassengers.com/forum/forumdisplay.php?fid=5)
+--- Thread: points turned negative (/showthread.php?tid=7104)



points turned negative - pulla - 14-08-2007

Hi i recently purchased FSPassengers and it rocks.

Only, there has been 1 little problem. I recently made a flight with the learjet, and everythign went alright and i finnished the flight without any
penaltys or - scores. Then, when i clicked on record flight, my points turned negative from about 30000 to -30000.
I also got downgraded. What is this? Does this mean "the end"? Do i have to start over again?


Re: points turned negative - JanniCash - 14-08-2007

That sounds like a rollover of a signed short integer to me.

A 16-bit signed int can hold a value range of -32768 to 32767. In C there is no implicit overflow checking, so 32767 + 1 yields -32768 ... ooops. The
same happens in "not so well designed" databases too when their developers oversaw this little quirk. A database has to error out and rollback the
transaction on data overflow, but the bad ones just go ahead and silently corrupt your data. So if it isn't in Dan's code, it could just be a badly
chosen data type (smallint) for the points attribute in the pilots table.

That of course is just an educated guess. Dan would have to confirm to be sure.


Jan




Re: points turned negative - DBE - 14-08-2007

Are you absolutely sure that you have the latest version?




Re: points turned negative - pulla - 14-08-2007

Just wanted to say, i found the anwser in the FAQ, but i already had the latest version! Anyway, i got my points back. Thanks!