Jedzkie 58 Posted June 24, 2015 Hi! How can i put comma's in number thru script? not a manually input a comma in number, i need a automated comma in every 3 digits. for example: before: You have 1000 Cash Points. After: You have 1,000 Cash Points. Regards, Frost Quote Share this post Link to post Share on other sites
0 Aeromesi 180 Posted June 24, 2015 You know, I've been wondering this too @@Frost. I'm not quite sure if that is possible, like.@var = 100000 mes "You have "+.@var+" points";It just kind of looks unprofessional without commas. I get what you mean and I'm not sure it is possible, you might be stuck with manually having to put the " , " in place of your integers inside your scripts. :/ Now someone correct me if I'm wrong! Quote Share this post Link to post Share on other sites
0 Kuya Jeo 120 Posted June 24, 2015 @@Frosttry this one Credit with AnnieRuru from rAthena function script int__ { .@i = getstrlen( .@str$ = getarg(0) ) -3; .@is_negative = charat( .@str$, 0 ) == "-"; while ( .@i > .@is_negative ) { .@str$ = insertchar( .@str$, ",", .@i ); .@i -= 3; } return .@str$;} or this one from eAthenahttp://www.eathena.ws/board/index.php?showtopic=170497 Quote Share this post Link to post Share on other sites
0 Jedzkie 58 Posted June 24, 2015 @@Frost try this one Credit with AnnieRuru from rAthena function script int__ { .@i = getstrlen( .@str$ = getarg(0) ) -3; .@is_negative = charat( .@str$, 0 ) == "-"; while ( .@i > .@is_negative ) { .@str$ = insertchar( .@str$, ",", .@i ); .@i -= 3; } return .@str$;} or this one from eAthena http://www.eathena.ws/board/index.php?showtopic=170497 How do i insert it in my script? sorry new i scripting Quote Share this post Link to post Share on other sites
0 Kuya Jeo 120 Posted June 24, 2015 @@Frost read it here how to put it http://www.eathena.ws/board/index.php?showtopic=170497 Quote Share this post Link to post Share on other sites
Hi!
How can i put comma's in number thru script? not a manually input a comma in number, i need a automated comma in every 3 digits.
for example:
before:
You have 1000 Cash Points.
After:
You have 1,000 Cash Points.
Regards,
Frost
Share this post
Link to post
Share on other sites