anakpondok Posted June 15, 2013 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 5 Reputation: 0 Joined: 03/21/13 Last Seen: June 25, 2013 Share Posted June 15, 2013 (edited) i'm trying to make an npc for admins to be able to check current total zeny in server i could load it from mysql no problem the problem is when the message appear it only shows 2,147,483,647 zeny, i know this is due to signed int on zeny my question is how to turn zeny into double only on my script so that the npc will show the correct amount of zeny? i have been testing on a very simple script to be able to show amount above 2,147,483,647 and i keep on getting 0 the simple script i made is set a, 4000000000; mes " Zeny is "+ a; close; Please kindly help Edited June 15, 2013 by anakpondok Quote Link to comment Share on other sites More sharing options...
Emistry Posted June 15, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2371 Joined: 10/28/11 Last Seen: Sunday at 11:27 AM Share Posted June 15, 2013 (edited) not sure if this really work ... query_sql( "SELECT SUM(`zeny`) FROM `char`",.@zeny$ ); mes "Total Zeny : "+.@zeny$; if run by query...you can retrieve all zeny...and by using char variable to save the data....perhap you can achieve what you want... if you want to change the zeny limit in server...believe that are alot part you need to change...datatype...sql datatype...and etc... edit : if you are using flux cp ... or ceres cp....i think both have the function ...just view the "server info" page of your website.... Edited June 15, 2013 by Emistry Quote Link to comment Share on other sites More sharing options...
anakpondok Posted June 15, 2013 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 5 Reputation: 0 Joined: 03/21/13 Last Seen: June 25, 2013 Author Share Posted June 15, 2013 not sure if this really work ... query_sql( "SELECT SUM(`zeny`) FROM `char`",.@zeny$ ); mes "Total Zeny : "+.@zeny$; if run by query...you can retrieve all zeny...and by using char variable to save the data....perhap you can achieve what you want... if you want to change the zeny limit in server...believe that are alot part you need to change...datatype...sql datatype...and etc... edit : if you are using flux cp ... or ceres cp....i think both have the function ...just view the "server info" page of your website.... Yes sir, i use something like that to retrieve the zeny and still shows the max int limit, would it be possible to assign the .@zeny$ to be double? Quote Link to comment Share on other sites More sharing options...
DeadlySilence Posted June 15, 2013 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 181 Reputation: 53 Joined: 04/07/13 Last Seen: August 23, 2014 Share Posted June 15, 2013 You cannot use number formats other than integer, unfortunately =/ But if you use Emistry's way, you select the value as a string, which is not as limited as an integer. Quote Link to comment Share on other sites More sharing options...
anakpondok Posted June 17, 2013 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 5 Reputation: 0 Joined: 03/21/13 Last Seen: June 25, 2013 Author Share Posted June 17, 2013 You cannot use number formats other than integer, unfortunately =/ But if you use Emistry's way, you select the value as a string, which is not as limited as an integer. ahhhhh now i understand coz of the $, sorry emistry didn't notice that, will try, thx so much emistry and deadlysilence Quote Link to comment Share on other sites More sharing options...
Question
anakpondok
i'm trying to make an npc for admins to be able to check current total zeny in server
i could load it from mysql no problem
the problem is when the message appear it only shows 2,147,483,647 zeny, i know this is due to signed int on zeny
my question is how to turn zeny into double only on my script so that the npc will show the correct amount of zeny?
i have been testing on a very simple script to be able to show amount above 2,147,483,647 and i keep on getting 0
the simple script i made is
set a, 4000000000;
mes " Zeny is "+ a;
close;
Please kindly help
Edited by anakpondokLink to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.