Raised This Month: $ Target: $400
 0% 

Problem from SQL to MOTD


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
msbeden
Member
Join Date: Jan 2020
Location: Turkey, Eskisehir
Old 01-28-2020 , 10:02   Re: Problem from SQL to MOTD
Reply With Quote #5

But I can't print from SQL. It says "0" or as a number. Is there an error in the variable definitions?

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

new rank;

rank= SQL_ReadResult(Query,1)

..

iLen += format(motd[iLen], 1535-iLen,"<tr><td>%d <td>%s <td>%i <td>%i ^n", line, name, rank, point, point == 1 ? "" : "") 
..
iLen += format(motd[iLen], 1535-iLen,"<tr><td>%d <td>%s <td>%i <td>%i ^n", line, name, rank, point, point == 1 ? "" : "")

I used it. But rank comes 0.

which %s, %d, %i ?

Last edited by msbeden; 01-28-2020 at 10:21.
msbeden is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode