Forums
Forum Main >>Bugs & Issues >> Selling property does not support comma
RPWT
ID: 1532848
Level: 38
Posts: 64
Score: 116 Thread created on Sun Oct 28, 2012 15:58:57 Last replied to on Tue Oct 30, 2012 11:18:17
as shown below
after clicking 'Sell' button, it becomes like this
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: 17146
Score: 10316
Posted on Mon Oct 29, 2012 13:12:03
For Ched
Super secret reinforced spam barrier 2.0
cyberdude
ID: 1613175
Level: 36
Posts: 404
Score: 516
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: 54
Posts: 5476
Score: 3025
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 Ched, Hire me as a developer. Peek my profile!
God watches you have a poo. Serious. _ Super secret reinforced spam barrier 2.0
Chedburn
ID: 1
Level: 30
Posts: 6410
Score: 10873
Posted on Tue Oct 30, 2012 11:18:17
Fixed thanks.
We just use: str_replace(',', '', $money);
Follow @TornRPG