Jump to content
  • 0
hendra814

Cash Ladder Script Error

Question

Need Help, my script for looking cash ladder showing error at Map server.

post-5318-0-75536200-1477444965_thumb.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

Edited by hendra814
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

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 :P

Link to comment
Share on other sites

  • 0

Need Help, my script for looking cash ladder showing error at Map server.

attachicon.gif2016-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 by Azeroth
Link to comment
Share on other sites

  • 0

 

Need Help, my script for looking cash ladder showing error at Map server.

attachicon.gif2016-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

Link to comment
Share on other sites

  • 0

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 :P

Thank you very much Lelouch vi Britannia

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.