Jump to content
  • 0

Wot Ranking


brunoshp

Question


  • Group:  Members
  • Topic Count:  64
  • Topics Per Day:  0.02
  • Content Count:  180
  • Reputation:   7
  • Joined:  12/19/12
  • Last Seen:  

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!

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  64
  • Topics Per Day:  0.02
  • Content Count:  180
  • Reputation:   7
  • Joined:  12/19/12
  • Last Seen:  

if i need to reset ranking, how i do?

Edited by brunoshp
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

if i need to reset ranking, how i do?

 

update `char` set `wotrank` = 0
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  64
  • Topics Per Day:  0.02
  • Content Count:  180
  • Reputation:   7
  • Joined:  12/19/12
  • Last Seen:  

Thx for all!

Edited by brunoshp
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...