Forums
First  << 1 >>  Last
Forum Main>>Bugs & Issues>> Selling property does not support comma
redguoguo

ID: 1532848
Level: 48
Posts: 64
Score: 116
SMTH redguoguo [1532848]Reply | Quote | Report

Thread created on Sun Oct 28, 2012 15:58:57
Last replied to on Tue Oct 30, 2012 11:18:17
as shown below
700a82ef-54d7-653a-1532848.png
after clicking 'Sell' button, it becomes like this
700a82ef-54f5-0cab-1532848.png

although you can always click 'Back' before it's too late, however systems like bazaar already support comma grammar.

So I think this should be a bug.
Please fix it, thanks.


Super secret reinforced spam barrier 2.0
RatedR

ID: 72498
Level: 75
Posts: 19223
Score: 12068
RatedR [72498]Reply | Quote | Report

Posted on Mon Oct 29, 2012 13:12:03
For Ched



Super secret reinforced spam barrier 2.0
cyberdude

ID: 1613175
Level: 47
Posts: 850
Score: 1097
NuBzcyberdude [1613175]Reply | Quote | Report

Posted on Mon Oct 29, 2012 19:45:41
This is generally happening across the game, if I'm not mistaken this is the same issue everywhere where you can enter prices.

Edit:
Didn't read your entire post, didn't know Bazaar supports comma.

Last Edited: Mon Oct 29, 2012 19:46:23
Super secret reinforced spam barrier 2.0
XOR

ID: 743049
Level: 58
Posts: 5508
Score: 3064
XOR [743049]Reply | Quote | Report

Posted on Mon Oct 29, 2012 22:37:52
Notes for Ched:

There is a command in PHP that allows REGEX to be run.
REGEX is powerful, and can be used to strip everything EXCEPT wanted characters.
The command is:

PHP Code
$newString = preg_replace($patterns, $replacements, $string);


Configured to strip everything except numbers:

PHP Code
$newString = preg_replace('/[^0-9]/g', '', $_POST['input_item']);


Source:
php.net/manual/en/function.preg-replace.php


I highly recommend using Regex. It's VERY powerful, and VERY useful.

Last Edited: Mon Oct 29, 2012 22:39:42
rK2kzNq.png
Super secret reinforced spam barrier 2.0
Chedburn

ID: 1
Level: 35
Posts: 7240
Score: 12649
Chedburn [1]Reply | Quote | Report

Posted on Tue Oct 30, 2012 11:18:17
Fixed thanks.

We just use: str_replace(',', '', $money);

Ched.jpg
Forum Main>>Bugs & Issues>> Selling property does not support comma
First  << 1 >>  Last