Max Value!

Post bugs or suggestions to the game here. Or discuss development topics.
Post Reply
Mr President
Advanced Member
Posts: 33
Joined: Tue Dec 18, 2007 1:11 am

Post by Mr President »

I have the game factor set at 1/10 so i can get the higher numbers. But i have ran into a problem and i am hoping someone here knows how to fix it *laughs*..

the max value = 214,748,364

So anytime someone buys more then this per unit, it drops them back down to this number and messes up the networth.

Is there a way i can increase this max value and if so, where in the code and how would i do it?

I think you guys have always played with it set at 1/1000 (game factor) but myself and my members would like to have the higher numbers..

Thanks for any help you can send my way :-)

** ok after doing some checking and learning :-) there is an INT in programming is a Integer between -214748364 and 214748364. This needs to be changed to a float from what i understand. But i still have no idea what file this is in so i can change it.. Does anyone here know? :)
FireFrenzy
Advanced Member
Posts: 92
Joined: Tue Jul 17, 2007 8:30 pm

Post by FireFrenzy »

Well, the values are stored in the MySQL database, so typically these limitations occur due to the field properties there. However, in this case, the issue isn't the actual limit stored in the MySQL database, but rather its subsequent conversion in PHP.

The issue seems to be in funcs.php (line 406 of the FAF code):

code: Select all

$user[troop][$num] = intval($amt);
(particularly the 'intval' function). I'm not familiar with the alternatives, nor the ramifications of their use, but I suppose you could try to use 'floatval' to solve the issue. Its use could lead to further issues -- I'm not versed enough in the language to know. However, as troop values aren't stored as fractions, I could be wrong. In any case, that's the issue; perhaps someone else has a more erudite solution.
Post Reply
  • Members connected in real time

    🔒 Close the panel of connected members