Alright, Arthus told me that he lost troops. So I made him log off, and I accessed his account using the visual editor feature in the MiniMyAdmin feature.
Accessed Long2Players, and scrolled down to his troop count. This is what read.
I believe I found a fix. Credit goes to C4smok/WebOver.
w did you try out that new function? that is a new one, I found out my old one did not cover it =X
also another option was (int)round($value) but it created negative numbers in high values
that bcmath function does the trick, I got it set and working in wgz
eround($roundme)
{$roundme = bcadd($roundme,0);return $roundme;}
replacing round with eround..
problem is you have to replace every round in your code pretty much... if you have any exponents in bcmath it will break it..
This method is quicker then having to do bcadd($value,0)
which is basicly what it is
So yeah. (Sorry for the long form. Taken out of an IM)
Nami kotogotoku, waga tate to nare. Ikazuchi kotogotoku, waga yaiba to nare. Sōgyo no Kotowari!
波悉く我が盾となれ雷悉く我が刃となれ,双魚の理 !
Every wave be my shield, every lightning become my blade!
Replacing all round calls with a new function is not very hard. If he is sure this works, we may as well go ahead and integrate it. bcmath is not universally deployed, which is one concern; we should also probably check for the function's existence when defining our new round. Something like:
If the function bcadd exists
Then define eround as above
If it does not exist
Make eround a simple fallback for round
WGZ and FAF aren't based on the same codes, so I'd watch out with that kinda thing.
Dralfith: OH MY GOD
Dralfith: THIS IS TOO MUCH
Dralfith: (Profanity is a sign of Maturity)
Dralfith: WHY DID WE DO THIS?!
Acid Soulxx: I DON'T KNOW, WE MIGHT BE GLUTTONS FOR PUNISHMENT.
My point was these games might be using different versions of PHP, but you would know better than I. Many rewrites are going to be happening soon, it's going to suck.
Is this acting up again? I may be able to come up with a fix, though it would probably be a little "ghetto" by FaF standards.
Dralfith: OH MY GOD
Dralfith: THIS IS TOO MUCH
Dralfith: (Profanity is a sign of Maturity)
Dralfith: WHY DID WE DO THIS?!
Acid Soulxx: I DON'T KNOW, WE MIGHT BE GLUTTONS FOR PUNISHMENT.
Then don't you think it's about time to go PHP5? lol
And I'm just assuming FaF is using an old version, because I know that WGZ was/is and no other games have this problem to my knowledge.
Dralfith: OH MY GOD
Dralfith: THIS IS TOO MUCH
Dralfith: (Profanity is a sign of Maturity)
Dralfith: WHY DID WE DO THIS?!
Acid Soulxx: I DON'T KNOW, WE MIGHT BE GLUTTONS FOR PUNISHMENT.
We had the same problem @schnizits my guy said the php5 was not understanding some of the FM used for most prom games, we dropped old QM style completely.
Sorry dont know a good fix
tu voulez assassiner moi pour terre crotte, quand tu être tel chiffre de quelqu'un. ponier de feut
If you want to make enemies, try to change something. President Woodrow Wilson
If drug abuse is a disease, then a drug war is a crime. Unknown
War is like 'Hide n seek' when your found your usualy killed, you best be realy good at it, you only get to play once Tetigustas Shadowson
It is fatal to enter any war without the will to win it. General Douglas MacArthur
It is only the dead who have seen the end of war. Plato
The art of war is simple enough. Find out where your enemy is. Get at him as soon as you can. Strike him as hard as you can, and keep moving. Ulysses S Grant
The whole art of war consists of guessing at what is on the other side of the hill. Duke of Wellington
I'm working on finding a solution. If not every game has this problem, something has got to work. Though I doubt it's big enough of a problem to warrant a rather large scale change, it's more that I'm having trouble finding a way and it's annoying me.
I know that WGZ is based on an old "stolen" code, but I highly doubt FaF is based on an extremely old QM code, and even if it was, the one Valhall is based on would be even worse.
Dralfith: OH MY GOD
Dralfith: THIS IS TOO MUCH
Dralfith: (Profanity is a sign of Maturity)
Dralfith: WHY DID WE DO THIS?!
Acid Soulxx: I DON'T KNOW, WE MIGHT BE GLUTTONS FOR PUNISHMENT.
It has to do with the way PHP reads the numerical numbers and rounds them properly into place. For example, 41mil is read as 41E6 and such. It isn't reconverted back into its numerical form, and thus is lost.
Like with Kuthloh, if I access his account, and he really had 41 guys, it should read 4.1E7
Nami kotogotoku, waga tate to nare. Ikazuchi kotogotoku, waga yaiba to nare. Sōgyo no Kotowari!
波悉く我が盾となれ雷悉く我が刃となれ,双魚の理 !
Every wave be my shield, every lightning become my blade!
You don't think there is any brute force or backwards way of fixing it?
Like I said though, I'm just operating under the assumption that it can be fixed, because it isn't ed up for everyone.
Dralfith: OH MY GOD
Dralfith: THIS IS TOO MUCH
Dralfith: (Profanity is a sign of Maturity)
Dralfith: WHY DID WE DO THIS?!
Acid Soulxx: I DON'T KNOW, WE MIGHT BE GLUTTONS FOR PUNISHMENT.