Bug: Strange News About Market Sales

As bugs and suggestions are fixed/implemented/rejected, they will be moved in here.
Post Reply
User avatar
Ruddertail
Promi Diplomacy ate my homework...
Posts: 4510
Joined: Wed May 12, 2004 11:39 pm
Location: Chances are, playing FAF.
Contact:

Post by Ruddertail »

0.5 hours ago You sold $2,012,918,014 Food on the market for $0>
Is that a bug, or is it an admin testing somthing? I didn't sell any food. The $0 seems like a bug, if the rest isn't.

(Title edited by Veranor)
Empires:
WOA: Attila the Hun(#13)
BFR: ?
Founder and Leader of Hungry Huns (HH)
User avatar
Slasher
The FAF Forums SMEGHEAD!!! lol
Posts: 2635
Joined: Mon May 03, 2004 5:08 pm
Location: http://florida4us.com/
Contact:

Post by Slasher »

You sold $2,012,918,014 Food
</b> looks more like a bug to me m8 *laughs*
I do not have a signature, you must be imagining

http://florida4us.com/

Image
User avatar
Ruddertail
Promi Diplomacy ate my homework...
Posts: 4510
Joined: Wed May 12, 2004 11:39 pm
Location: Chances are, playing FAF.
Contact:

Post by Ruddertail »

Didn't even notice that part. Food doesn't need a dolar sign...
Empires:
WOA: Attila the Hun(#13)
BFR: ?
Founder and Leader of Hungry Huns (HH)
User avatar
Slasher
The FAF Forums SMEGHEAD!!! lol
Posts: 2635
Joined: Mon May 03, 2004 5:08 pm
Location: http://florida4us.com/
Contact:

Post by Slasher »

*laughs* good job i did :P
I do not have a signature, you must be imagining

http://florida4us.com/

Image
Veranor
FAF Co-Programmer
Posts: 310
Joined: Mon Mar 08, 2004 8:12 pm

Post by Veranor »

This could be a result of intval(), though it sounds like it isn't.
"The truth is a trap: you can not get it without it getting you; you cannot get the truth by capturing it, only by its capturing you." - Søren Kierkegaard
User avatar
The Beatles
Fear me for I am root
Posts: 6285
Joined: Tue May 24, 2005 8:12 pm

Post by The Beatles »

Would round() in itself be enough?
For floatval(), what if they put in 5.5?

Argh, wrong topic, but you know what I meant.
:wq
Veranor
FAF Co-Programmer
Posts: 310
Joined: Mon Mar 08, 2004 8:12 pm

Post by Veranor »

The Beatles wrote: Would round() in itself be enough?
For floatval(), what if they put in 5.5?

Argh, wrong topic, but you know what I meant.
Round has been sufficient for fixInputNum has it not?

It returns a float, a float can not have any ebil characters.

Anyways, fixinputNegativeNum is currently:


function fixInputNegativeNum (&$num) {
$num = round(str_replace(",", "", $num));
$num = floatval($num);
}

So the rounding is in there.
I'll set up a test of round's capabilities.
"The truth is a trap: you can not get it without it getting you; you cannot get the truth by capturing it, only by its capturing you." - Søren Kierkegaard
User avatar
The Beatles
Fear me for I am root
Posts: 6285
Joined: Tue May 24, 2005 8:12 pm

Post by The Beatles »

fixInputNegativeNum now uses round only, as I tested round. Topic closed.
:wq
Post Reply
  • Members connected in real time

    🔒 Close the panel of connected members