View Full Version : Need help about a PHP problem, please help!

12th October 2005, 01:29 PM
Hello! First of all let me quickly introduce myself, I am a KoC player but I also play another MMORPG game-- www.shopwarsonline.com .

The problem that I bring here is about a PHP technical problem of the game that doesnt let us to get more than 2 billion in income, atack....

I dont know anything about PHP thats why I asked the shopwars admin, solid_Snake, to tell the problem:

This what he asnwered:

"the caps are the limit of the programing languages ability to procsess the intiger, basically PHP process a higher intiger/number than the 2,000,000,000 cap, any higher and it will convert it into standard form, which will confuse most of the users."

If anyone there in KoC community can help us solve this problem we will be really gratefull!! We have no idea how to solve this out.

12th October 2005, 01:45 PM
ok first off, its not a php problem, its a sql problem.

i really shoul throw this over to pc/tech support, but instead i'll just give you your solution. Change the database field for the attack/defence and any other numbers that need to go over the limit from an int field to a BIG INT field. this gives ou the ability to use 19 digit numbers, so i doubt you'll run out soon. :P

oh and i'm loving your 'captcha' on the register page...

12th October 2005, 02:07 PM
oh and i'm loving your 'captcha' on the register page...lol I'm sure that will deterr any and all auto programs :rofl:

Could you have it autofill too plz? :tongue:
lol j/k

yeah, that might be a good issue to resolve ;)

13th October 2005, 01:45 AM
Thanxs for the help carnage! I am reporting the asnwer to shopwars admin ;)

13th October 2005, 01:55 PM
"i may change hosts but it is a php problem not mysql, i tested it"

This was the asnwer from the game admin.... :help:

13th October 2005, 07:54 PM
well, if its being caused by php the only cause i can think of is if the host didnt install the gmc maths modual correctly/at all... if thats the case then he needs to do something clever to deal with larger numbers.

i had some algorithms i used in flash when i needed to handle large numbers... but ive not got them here. ill see if i can write something up.

class number {
var $num;
function add ($number) {
foreach($number->num as $id => $value)
$this->num[$id] += $carry + $value;
if ($this->num[$id] > 9)
$this->$num[$id] -= 9;
$carry = 1;
$carry = 0;

thats the basis for it. needs quite a bit mre work and isnt that effective but you get the idea.

in essance you are creating a totally different number object which works on a number as an array of its digits.