Raised This Month: $51 Target: $400
 12% 

SZ_GetSpace: overflow on netchan->message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 04-26-2015 , 13:17   SZ_GetSpace: overflow on netchan->message
Reply With Quote #1

So this is my script :

Code:
#include <amxmodx> #define TimerMinutes(%0)    ( %0 / 60000 % 60 ) #define TimerSeconds(%0)    ( %0 / 1000 % 60   ) #define TimerMilliseconds(%0)   ( %0     %     1000    ) #define loop       (1000000) // 1 m public plugin_init() {         register_plugin("Get Speed value" , "0.1" , "Freezo" )     register_concmd("get_speed","getSpeedvalue");     } public getSpeedvalue(id) {     new timer1, timer2, timer3, i;     new strCheck[23];     timer1 = tickcount();     for (i = 0; i < loop; i++){         format(strCheck, charsmax (strCheck) , "This is test must work" )         client_print( id , print_chat , strCheck )     }                 timer2 = tickcount();     for (i = 0; i < loop; i++){         formatex(strCheck, charsmax (strCheck) , "This is test must work" )         client_print( id , print_chat , strCheck )     }         timer3 = tickcount();     server_print("1st method run in  : %s | 2st method run in : %s", TimerConvert( timer2 - timer1 ) , TimerConvert( timer3 - timer2 ) );     } stock TimerConvert( timer ) { new iTime[20]; formatex(iTime, charsmax (iTime) , "%d:%02d:%03d", TimerMinutes(timer) , TimerSeconds(timer) , TimerMilliseconds(timer)); return iTime; }

i know what is a overflow , but what should i do to fix this prob ? i've try to change the value of loop but its not working ... !
This is the output

Code:
SZ_GetSpace: overflow on netchan->message
1st method run in  : 0:00:698 | 2st method run in : 0:00:692
WARNING: reliable overflow for Freezo
Freezo overflowed
Reliable channel over
Freezo Begin is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 04-26-2015 , 14:15   Re: SZ_GetSpace: overflow on netchan->message
Reply With Quote #2

If you're measuring format() vs. formatex(), don't print the message. I'm assuming that is what is causing the overflow.
__________________
Black Rose is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 04-26-2015 , 14:17   Re: SZ_GetSpace: overflow on netchan->message
Reply With Quote #3

You know what's an overflow, but you don't know what's an overflow inside goldsrc. You're sending a message with client_print. It's actually a packet that you send to clients. They need to be sended, but you're actually stacking them. When a max value is reached, overflow message is triggered. In this case, inside client_print native you're sending a reliable message, which means, if player doesn't receive a reliable message, should get kicked from the server.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 04-26-2015 , 14:34   Re: SZ_GetSpace: overflow on netchan->message
Reply With Quote #4

Quote:
Originally Posted by Black Rose View Post
If you're measuring format() vs. formatex(), don't print the message. I'm assuming that is what is causing the overflow.
Euh ! already try it but they give me the same result in running time ...

Quote:
Originally Posted by meTaLiCroSS View Post
You know what's an overflow, but you don't know what's an overflow inside goldsrc. You're sending a message with client_print. It's actually a packet that you send to clients. They need to be sended, but you're actually stacking them. When a max value is reached, overflow message is triggered. In this case, inside client_print native you're sending a reliable message, which means, if player doesn't receive a reliable message, should get kicked from the server.
Ops ! Thanks i didnt know that ! What should i send then ?
Freezo Begin is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 04-26-2015 , 15:26   Re: SZ_GetSpace: overflow on netchan->message
Reply With Quote #5

Works fine. You must've done something wrong.
Code:
#include <amxmodx> #define TimerMinutes(%0)    ( %0 / 60000 % 60 ) #define TimerSeconds(%0)    ( %0 / 1000 % 60   ) #define TimerMilliseconds(%0)   ( %0     %     1000    ) #define loop       (1000000) // 1 m public plugin_init() {         register_plugin("Get Speed value" , "0.1" , "Freezo" )     register_concmd("get_speed","getSpeedvalue");     } public getSpeedvalue(id) {     new timer1, timer2, timer3, i;     new strCheck[23];     timer1 = tickcount();     for (i = 0; i < loop; i++){         format(strCheck, charsmax (strCheck) , "This is test must work" )         //client_print( id , print_chat , strCheck )     }                 timer2 = tickcount();     for (i = 0; i < loop; i++){         formatex(strCheck, charsmax (strCheck) , "This is test must work" )         //client_print( id , print_chat , strCheck )     }         timer3 = tickcount();     server_print("1st method run in  : %s | 2st method run in : %s", TimerConvert( timer2 - timer1 ) , TimerConvert( timer3 - timer2 ) );     } stock TimerConvert( timer ) { new iTime[20]; formatex(iTime, charsmax (iTime) , "%d:%02d:%03d", TimerMinutes(timer) , TimerSeconds(timer) , TimerMilliseconds(timer)); return iTime; }

Code:
1st method run in  : 0:00:102 | 2st method run in : 0:00:080
__________________

Last edited by Black Rose; 04-26-2015 at 15:26.
Black Rose is offline
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 04-26-2015 , 15:39   Re: SZ_GetSpace: overflow on netchan->message
Reply With Quote #6

Quote:
Originally Posted by Black Rose View Post
Works fine. You must've done something wrong.
Code:
#include <amxmodx> #define TimerMinutes(%0)    ( %0 / 60000 % 60 ) #define TimerSeconds(%0)    ( %0 / 1000 % 60   ) #define TimerMilliseconds(%0)   ( %0     %     1000    ) #define loop       (1000000) // 1 m public plugin_init() {         register_plugin("Get Speed value" , "0.1" , "Freezo" )     register_concmd("get_speed","getSpeedvalue");     } public getSpeedvalue(id) {     new timer1, timer2, timer3, i;     new strCheck[23];     timer1 = tickcount();     for (i = 0; i < loop; i++){         format(strCheck, charsmax (strCheck) , "This is test must work" )         //client_print( id , print_chat , strCheck )     }                 timer2 = tickcount();     for (i = 0; i < loop; i++){         formatex(strCheck, charsmax (strCheck) , "This is test must work" )         //client_print( id , print_chat , strCheck )     }         timer3 = tickcount();     server_print("1st method run in  : %s | 2st method run in : %s", TimerConvert( timer2 - timer1 ) , TimerConvert( timer3 - timer2 ) );     } stock TimerConvert( timer ) { new iTime[20]; formatex(iTime, charsmax (iTime) , "%d:%02d:%03d", TimerMinutes(timer) , TimerSeconds(timer) , TimerMilliseconds(timer)); return iTime; }

Code:
1st method run in  : 0:00:102 | 2st method run in : 0:00:080
Ofc this is what i have done !
My bad !
Euh! i found it , i've change something in Function TimerConvert . i forget to not change it in the new script
Freezo Begin 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 07:12.


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