Posts: 436
Threads: 127
Joined: May 2014
Reputation:
0
how do i make a message that showing to all players,like
i'm using MySQL.
"X is the richest player with $2,000,000 money."
Posts: 100
Threads: 2
Joined: May 2016
With a SQL statement.
Quote:
SELECT `name`, `money` FROM `accounts` ORDER BY `money` DESC LIMIT 1
|
Get the result and send a message.
Posts: 436
Threads: 127
Joined: May 2014
Reputation:
0
Yes i know,but i confuse that what is the %s.
it will show an error if you do:
"%s is the most richest player with %s money on bank account", playerName, BankMoney);
Posts: 1,830
Threads: 49
Joined: Nov 2014
Reputation:
0
%s is for a string, which consists of characters (letters, numbers etc.)
Use %i for displaying the amount of money, which is for an integer (numbers)
Posts: 436
Threads: 127
Joined: May 2014
Reputation:
0
It's using FormatNumber,I missed that,because it's just an example.
and yes,i still confuse.
Posts: 3,934
Threads: 353
Joined: Jan 2010
Reputation:
0
Can't really do much without any codes and the error message(s).
Posts: 766
Threads: 66
Joined: Feb 2014
Reputation:
0
Which version of MySQL are you using?