View Single Post
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-28-2020 , 14:15   Re: Problem from SQL to MOTD
Reply With Quote #7

Quote:
// SQL query: SELECT Player, Rank, XP FROM HGRank ORDER BY XP DESC LIMIT 10

new rank;

rank= SQL_ReadResult(Query,1)
The first result is player, not rank. Rank is the second one, plus it's a string, so do this:

Code:
new szRank[CRXRANKS_MAX_RANK_LENGTH] SQL_ReadResult(Query, 2, szRank, charsmax(szRank))
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom