Raised This Month: $ Target: $400
 0% 

Why does this top10 not show top20?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-06-2018 , 21:01   Re: Why does this top10 not show top20?
Reply With Quote #1

sBuffer[] may be too small
__________________
Bugsy is offline
blood2k
Senior Member
Join Date: Mar 2014
Old 08-06-2018 , 22:01   Re: Why does this top10 not show top20?
Reply With Quote #2

What's a good value?
blood2k is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-07-2018 , 17:10   Re: Why does this top10 not show top20?
Reply With Quote #3

Quote:
Originally Posted by blood2k View Post
What's a good value?
To make it easy, double whatever you had previously.
You do however have a limit in the MOTD of 1536 characters which you probably will hit. In order to work around that you'll have to print everything to a local file and link the MOTD to the file instead of supplying it a string.

I think it's as easy as this, haven't tested it thought.
Code:
show_motd(id, sBuffer);
->
Code:
new hFile = fopen("top20.htm", "w"); fputs(hFile, sBuffer); fclose(hFile); show_motd(id, "top20.htm");
__________________

Last edited by Black Rose; 08-07-2018 at 17:10.
Black Rose is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-08-2018 , 12:42   Re: Why does this top10 not show top20?
Reply With Quote #4

Quote:
Originally Posted by Black Rose View Post
To make it easy, double whatever you had previously.
You do however have a limit in the MOTD of 1536 characters which you probably will hit. In order to work around that you'll have to print everything to a local file and link the MOTD to the file instead of supplying it a string.

I think it's as easy as this, haven't tested it thought.
Code:
show_motd(id, sBuffer);
->
Code:
new hFile = fopen("top20.htm", "w"); fputs(hFile, sBuffer); fclose(hFile); show_motd(id, "top20.htm");
IIRC, the limit is still there for displaying a file. It has to do with transmitting to the player. So, the only way to bypass that limit is to host the content on a website.
__________________
fysiks is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-08-2018 , 13:17   Re: Why does this top10 not show top20?
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
IIRC, the limit is still there for displaying a file. It has to do with transmitting to the player. So, the only way to bypass that limit is to host the content on a website.
Good to know, thanks.
__________________
Black Rose is offline
Reply



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 12:39.


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