Jump to content

Question

Posted

i need to add Ranking wot in this raking pvp.

 

		mes "Ok, this is Ranking  WoT[TOP 10]";
		next;
		query_sql "SELECT name, wotrank FROM char ORDER BY char DESC LIMIT 10",@name$,@charwot;
		dispbottom "Ranking WOT [TOP 10]";
		dispbottom " ";
		dispbottom "Player < x > Position";
		dispbottom " ";
		for(set @i,0;@i<=9;set @i,@i+1) {
		dispbottom "["+(@i+1)+"] < x > "+@name$[@i]+" < x > "+@charwot[@i]+"";
		}
		close;
 

my table in database :

ALTER TABLE `char` ADD `wotrank` INT NOT NULL ;

 this not ok, help me to fix!! pls!

4 answers to this question

Recommended Posts

Posted

Don't forget ` in the query, sometimes that make an issue

 

		mes "Ok, this is Ranking  WoT[TOP 10]";
		next;
		query_sql "SELECT `name`, `wotrank` FROM `char` where `wotrank` != 0 ORDER BY `wotrank` DESC LIMIT 10", .@name$, .@charwot;
		if ( .@charwot == 0 ) {
			dispbottom "The ranking is empty.";
			close;
		}
		dispbottom "Ranking WOT [TOP 10]";
		dispbottom " ";
		dispbottom "Player < x > Position";
		dispbottom " ";
		for(set .@i,0; .@i<=9; set .@i, .@i+1 ) {
			dispbottom "["+(.@i+1)+"] < x > "+ .@name$[.@i] +" < x > "+ @charwot[.@i] +"";
		}
		close;
  • Upvote 1

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...