Jump to content
The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades. ×
  • 0

about ladder board & query_sql


cahadeyelo

Question


  • Group:  Members
  • Topic Count:  71
  • Topics Per Day:  0.02
  • Content Count:  174
  • Reputation:   1
  • Joined:  11/13/14
  • Last Seen:  

my ladder board keeps getting error about char_reg_num....here's my script

function	script	BREAKER	{
	query_sql "SELECT `char`.char_id,`char`.`name`,global_reg_value.`value` FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id WHERE global_reg_value.str='BREAKER' ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name$, .@count;

	mes "[ Breaker Ladder ]";
	for( set .@x,0; .@x<=9; set .@x,.@x+1 ) {
	mes "^0000FF"+(.@x+1)+".^000000 "+.@name$[.@x]+" - ^FF0000"+.@count[.@x]+"^000000 Point(s)";
	}
	close;
}
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  71
  • Topics Per Day:  0.02
  • Content Count:  174
  • Reputation:   1
  • Joined:  11/13/14
  • Last Seen:  

my ladder board keeps getting error about char_reg_num....here's my script

function	script	BREAKER	{
	query_sql "SELECT `char`.char_id,`char`.`name`,global_reg_value.`value` FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id WHERE global_reg_value.str='BREAKER' ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name$, .@count;

	mes "[ Breaker Ladder ]";
	for( set .@x,0; .@x<=9; set .@x,.@x+1 ) {
	mes "^0000FF"+(.@x+1)+".^000000 "+.@name$[.@x]+" - ^FF0000"+.@count[.@x]+"^000000 Point(s)";
	}
	close;
}
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   127
  • Joined:  04/04/16
  • Last Seen:  

replace all global_reg_value with char_reg_num

 

it was changed since the Script Engine Upgrade update

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