hendra814 Posted October 26, 2016 Posted October 26, 2016 (edited) Need Help, my script for looking cash ladder showing error at Map server. and here my script prontera,147,168,5 script [[G]]Ladder 990,{ switch(select("Zeny:Cash")){ case 1: query_sql("SELECT `c`.`name`, `c`.`class`, `c`.`base_level`, `c`.`job_level`, `c`.`zeny`, `g`.`name` FROM `char` c LEFT JOIN (`guild` g) ON (`c`.`guild_id` = `g`.`guild_id`) ORDER BY `c`.`zeny` DESC LIMIT 10", .@name$, .@class, .@blvl, .@jlvl, .@zeny, .@guild$); for (.@i = 0; .@i < getarraysize(.@name$); .@i++) { .@menu$ = (("" == .@menu$) ? "Top " + (.@i + 1) + " - " + .@name$[.@i] : .@menu$ + ":Top " + (.@i + 1) + " - " + .@name$[.@i]); } mes "[Zeny Ranking]"; mes "Which character do you want to see details about?"; .@selected = select(.@menu$); next; mes "Name: " + .@name$[.@selected - 1]; mes "Class: " + jobname(.@class[.@selected - 1]); mes "Base level: " + .@blvl[.@selected - 1]; mes "Job level: " + .@jlvl[.@selected - 1]; mes "Guild: " + ((.@guild$[.@selected - 1]) ? .@guild$[.@selected - 1] : "none"); mes "Zeny: " + .@zeny[.@selected - 1]; end; case 2: query_sql "SELECT `char`.`name`, CAST(`value` AS UNSIGNED) FROM global_reg_value " + "LEFT JOIN `char` ON global_reg_value.account_id=`char`.account_id " + "WHERE global_reg_value.`str`='#CASHPOINTS' GROUP BY `char`.account_id " + "ORDER BY CAST(`value` AS UNSIGNED) DESC LIMIT 128", .@name$, .@cash; mes "[Top "+getarraysize(.@name$)+" Cash Points]"; for (set .@i,0; .@i<getarraysize(.@name$); set .@i,.@i+1) mes (.@i+1) +". "+ .@name$[.@i] +" cash "+ .@cash[.@i]; close; } } How to Fix this problem. Thanks Edited October 26, 2016 by hendra814 Quote
0 Lelouch vi Britannia Posted October 27, 2016 Posted October 27, 2016 Try changing this... query_sql "SELECT `char`.`name`, CAST(`value` AS UNSIGNED) FROM global_reg_value " + "LEFT JOIN `char` ON global_reg_value.account_id=`char`.account_id " + "WHERE global_reg_value.`str`='#CASHPOINTS' GROUP BY `char`.account_id " + "ORDER BY CAST(`value` AS UNSIGNED) DESC LIMIT 128", to this... query_sql "SELECT `char`.`name`, CAST(`value` AS UNSIGNED) FROM acc_reg_num " + "LEFT JOIN `char` ON acc_reg_num.account_id=`char`.account_id " + "WHERE acc_reg_num.`key`='#CASHPOINTS' GROUP BY `char`.account_id " + "ORDER BY CAST(`value` AS UNSIGNED) DESC LIMIT 128", PS. This is just a test and i havent tested it also Quote
0 Azeroth Posted October 26, 2016 Posted October 26, 2016 (edited) Need Help, my script for looking cash ladder showing error at Map server. 2016-10-25_171914.jpg and here my script prontera,147,168,5 script [[G]]Ladder 990,{ switch(select("Zeny:Cash")){ case 1: query_sql("SELECT `c`.`name`, `c`.`class`, `c`.`base_level`, `c`.`job_level`, `c`.`zeny`, `g`.`name` FROM `char` c LEFT JOIN (`guild` g) ON (`c`.`guild_id` = `g`.`guild_id`) ORDER BY `c`.`zeny` DESC LIMIT 10", .@name$, .@class, .@blvl, .@jlvl, .@zeny, .@guild$); for (.@i = 0; .@i < getarraysize(.@name$); .@i++) { .@menu$ = (("" == .@menu$) ? "Top " + (.@i + 1) + " - " + .@name$[.@i] : .@menu$ + ":Top " + (.@i + 1) + " - " + .@name$[.@i]); } mes "[Zeny Ranking]"; mes "Which character do you want to see details about?"; .@selected = select(.@menu$); next; mes "Name: " + .@name$[.@selected - 1]; mes "Class: " + jobname(.@class[.@selected - 1]); mes "Base level: " + .@blvl[.@selected - 1]; mes "Job level: " + .@jlvl[.@selected - 1]; mes "Guild: " + ((.@guild$[.@selected - 1]) ? .@guild$[.@selected - 1] : "none"); mes "Zeny: " + .@zeny[.@selected - 1]; end; case 2: query_sql "SELECT `char`.`name`, CAST(`value` AS UNSIGNED) FROM global_reg_value " + "LEFT JOIN `char` ON global_reg_value.account_id=`char`.account_id " + "WHERE global_reg_value.`str`='#CASHPOINTS' GROUP BY `char`.account_id " + "ORDER BY CAST(`value` AS UNSIGNED) DESC LIMIT 128", .@name$, .@cash; mes "[Top "+getarraysize(.@name$)+" Cash Points]"; for (set .@i,0; .@i<getarraysize(.@name$); set .@i,.@i+1) mes (.@i+1) +". "+ .@name$[.@i] +" cash "+ .@cash[.@i]; close; } } How to Fix this problem. Thanks So based on your error, ur no longer use the old emulator which it has 'global_reg_value' Edited October 26, 2016 by Azeroth Quote
0 hendra814 Posted October 26, 2016 Author Posted October 26, 2016 Need Help, my script for looking cash ladder showing error at Map server. 2016-10-25_171914.jpg and here my script prontera,147,168,5 script [[G]]Ladder 990,{ switch(select("Zeny:Cash")){ case 1: query_sql("SELECT `c`.`name`, `c`.`class`, `c`.`base_level`, `c`.`job_level`, `c`.`zeny`, `g`.`name` FROM `char` c LEFT JOIN (`guild` g) ON (`c`.`guild_id` = `g`.`guild_id`) ORDER BY `c`.`zeny` DESC LIMIT 10", .@name$, .@class, .@blvl, .@jlvl, .@zeny, .@guild$); for (.@i = 0; .@i < getarraysize(.@name$); .@i++) { .@menu$ = (("" == .@menu$) ? "Top " + (.@i + 1) + " - " + .@name$[.@i] : .@menu$ + ":Top " + (.@i + 1) + " - " + .@name$[.@i]); } mes "[Zeny Ranking]"; mes "Which character do you want to see details about?"; .@selected = select(.@menu$); next; mes "Name: " + .@name$[.@selected - 1]; mes "Class: " + jobname(.@class[.@selected - 1]); mes "Base level: " + .@blvl[.@selected - 1]; mes "Job level: " + .@jlvl[.@selected - 1]; mes "Guild: " + ((.@guild$[.@selected - 1]) ? .@guild$[.@selected - 1] : "none"); mes "Zeny: " + .@zeny[.@selected - 1]; end; case 2: query_sql "SELECT `char`.`name`, CAST(`value` AS UNSIGNED) FROM global_reg_value " + "LEFT JOIN `char` ON global_reg_value.account_id=`char`.account_id " + "WHERE global_reg_value.`str`='#CASHPOINTS' GROUP BY `char`.account_id " + "ORDER BY CAST(`value` AS UNSIGNED) DESC LIMIT 128", .@name$, .@cash; mes "[Top "+getarraysize(.@name$)+" Cash Points]"; for (set .@i,0; .@i<getarraysize(.@name$); set .@i,.@i+1) mes (.@i+1) +". "+ .@name$[.@i] +" cash "+ .@cash[.@i]; close; } } How to Fix this problem. Thanks So based on your error, ur no longer use the old emulator which it has 'global_reg_value' yes, i'm used lastest rathena Quote
0 hendra814 Posted November 4, 2016 Author Posted November 4, 2016 Try changing this... query_sql "SELECT `char`.`name`, CAST(`value` AS UNSIGNED) FROM global_reg_value " + "LEFT JOIN `char` ON global_reg_value.account_id=`char`.account_id " + "WHERE global_reg_value.`str`='#CASHPOINTS' GROUP BY `char`.account_id " + "ORDER BY CAST(`value` AS UNSIGNED) DESC LIMIT 128", to this... query_sql "SELECT `char`.`name`, CAST(`value` AS UNSIGNED) FROM acc_reg_num " + "LEFT JOIN `char` ON acc_reg_num.account_id=`char`.account_id " + "WHERE acc_reg_num.`key`='#CASHPOINTS' GROUP BY `char`.account_id " + "ORDER BY CAST(`value` AS UNSIGNED) DESC LIMIT 128", PS. This is just a test and i havent tested it also Thank you very much Lelouch vi Britannia Quote
Question
hendra814
Need Help, my script for looking cash ladder showing error at Map server.
and here my script
How to Fix this problem.
Thanks
Edited by hendra8144 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.