hendra814 Posted October 26, 2016 Share 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", [email protected]$, [email protected], [email protected], [email protected], [email protected], [email protected]$); for ([email protected] = 0; [email protected] < getarraysize([email protected]$); [email protected]++) { [email protected]$ = (("" == [email protected]$) ? "Top " + ([email protected] + 1) + " - " + [email protected]$[[email protected]] : [email protected]$ + ":Top " + ([email protected] + 1) + " - " + [email protected]$[[email protected]]); } mes "[Zeny Ranking]"; mes "Which character do you want to see details about?"; [email protected] = select([email protected]$); next; mes "Name: " + [email protected]$[[email protected] - 1]; mes "Class: " + jobname([email protected][[email protected] - 1]); mes "Base level: " + [email protected][[email protected] - 1]; mes "Job level: " + [email protected][[email protected] - 1]; mes "Guild: " + (([email protected]$[[email protected] - 1]) ? [email protected]$[[email protected] - 1] : "none"); mes "Zeny: " + [email protected][[email protected] - 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", [email protected]$, [email protected]; mes "[Top "+getarraysize([email protected]$)+" Cash Points]"; for (set [email protected],0; [email protected]<getarraysize([email protected]$); set [email protected],[email protected]+1) mes ([email protected]+1) +". "+ [email protected]$[[email protected]] +" cash "+ [email protected][[email protected]]; close; } } How to Fix this problem. Thanks Edited October 26, 2016 by hendra814 Quote Link to comment Share on other sites More sharing options...
0 Lelouch vi Britannia Posted October 27, 2016 Share 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 Link to comment Share on other sites More sharing options...
0 Azeroth Posted October 26, 2016 Share 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", [email protected]$, [email protected], [email protected], [email protected], [email protected], [email protected]$); for ([email protected] = 0; [email protected] < getarraysize([email protected]$); [email protected]++) { [email protected]$ = (("" == [email protected]$) ? "Top " + ([email protected] + 1) + " - " + [email protected]$[[email protected]] : [email protected]$ + ":Top " + ([email protected] + 1) + " - " + [email protected]$[[email protected]]); } mes "[Zeny Ranking]"; mes "Which character do you want to see details about?"; [email protected] = select([email protected]$); next; mes "Name: " + [email protected]$[[email protected] - 1]; mes "Class: " + jobname([email protected][[email protected] - 1]); mes "Base level: " + [email protected][[email protected] - 1]; mes "Job level: " + [email protected][[email protected] - 1]; mes "Guild: " + (([email protected]$[[email protected] - 1]) ? [email protected]$[[email protected] - 1] : "none"); mes "Zeny: " + [email protected][[email protected] - 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", [email protected]$, [email protected]; mes "[Top "+getarraysize([email protected]$)+" Cash Points]"; for (set [email protected],0; [email protected]<getarraysize([email protected]$); set [email protected],[email protected]+1) mes ([email protected]+1) +". "+ [email protected]$[[email protected]] +" cash "+ [email protected][[email protected]]; 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 Link to comment Share on other sites More sharing options...
0 hendra814 Posted October 26, 2016 Author Share 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", [email protected]$, [email protected], [email protected], [email protected], [email protected], [email protected]$); for ([email protected] = 0; [email protected] < getarraysize([email protected]$); [email protected]++) { [email protected]$ = (("" == [email protected]$) ? "Top " + ([email protected] + 1) + " - " + [email protected]$[[email protected]] : [email protected]$ + ":Top " + ([email protected] + 1) + " - " + [email protected]$[[email protected]]); } mes "[Zeny Ranking]"; mes "Which character do you want to see details about?"; [email protected] = select([email protected]$); next; mes "Name: " + [email protected]$[[email protected] - 1]; mes "Class: " + jobname([email protected][[email protected] - 1]); mes "Base level: " + [email protected][[email protected] - 1]; mes "Job level: " + [email protected][[email protected] - 1]; mes "Guild: " + (([email protected]$[[email protected] - 1]) ? [email protected]$[[email protected] - 1] : "none"); mes "Zeny: " + [email protected][[email protected] - 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", [email protected]$, [email protected]; mes "[Top "+getarraysize([email protected]$)+" Cash Points]"; for (set [email protected],0; [email protected]<getarraysize([email protected]$); set [email protected],[email protected]+1) mes ([email protected]+1) +". "+ [email protected]$[[email protected]] +" cash "+ [email protected][[email protected]]; 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 Link to comment Share on other sites More sharing options...
0 hendra814 Posted November 4, 2016 Author Share 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 Link to comment Share on other sites More sharing options...
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", [email protected]$, [email protected], [email protected], [email protected], [email protected], [email protected]$); for ([email protected] = 0; [email protected] < getarraysize([email protected]$); [email protected]++) { [email protected]$ = (("" == [email protected]$) ? "Top " + ([email protected] + 1) + " - " + [email protected]$[[email protected]] : [email protected]$ + ":Top " + ([email protected] + 1) + " - " + [email protected]$[[email protected]]); } mes "[Zeny Ranking]"; mes "Which character do you want to see details about?"; [email protected] = select([email protected]$); next; mes "Name: " + [email protected]$[[email protected] - 1]; mes "Class: " + jobname([email protected][[email protected] - 1]); mes "Base level: " + [email protected][[email protected] - 1]; mes "Job level: " + [email protected][[email protected] - 1]; mes "Guild: " + (([email protected]$[[email protected] - 1]) ? [email protected]$[[email protected] - 1] : "none"); mes "Zeny: " + [email protected][[email protected] - 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", [email protected]$, [email protected]; mes "[Top "+getarraysize([email protected]$)+" Cash Points]"; for (set [email protected],0; [email protected]<getarraysize([email protected]$); set [email protected],[email protected]+1) mes ([email protected]+1) +". "+ [email protected]$[[email protected]] +" cash "+ [email protected][[email protected]]; close; } }How to Fix this problem.
Thanks
Edited by hendra814Link to comment
Share on other sites