Reliable CHannel Overflow
I made this simple plugin for my clan's server so that we could advertise new ect. It works perfectly, but it causes a reliable channel overflow error eventually. we had msg_delay set to 90.0 and 60.0seconds the times this happened any ideas?
Code:
|
Re: Reliable CHannel Overflow
1. Why don't you set a looping task for it ?
2. Take a closer look at your while() loop... |
Re: Reliable CHannel Overflow
I think is because you send this to many players in the same moment!Why you don't send the message to all players by "0" with "client_print" ?
|
Re: Reliable CHannel Overflow
client print doesnt support the ^x04 color thing, and thats the only way I know how to make it colored green, is there a way to color it green with client print?
|
Re: Reliable CHannel Overflow
Do it the same way you're doing it but change from MSG_ONE (message sent to a single client, over reliable data stream) to MSG_BROADCAST (message to all players, unreliable).
This removes the need for a loop and MSG_BROADCAST is the equivalent of client_print(0...) and also it's unreliable which means (i think) it doesn't get sent if its going to cause an overflow. Also you don't need to read the file in every time you want to display the message. Read the file once on map load into a string array (define a number like MAX_ADS 30, new ads[MAX_ADS][128]) Then just loop through that array when you want to print.. |
Re: Reliable CHannel Overflow
thnx
Code:
|
Re: Reliable CHannel Overflow
Quote:
|
Re: Reliable CHannel Overflow
Turning this to MSG_BROADCAST is only a workaround to the problem. It will still flood the channel.
Again, your while() loop is causing this. |
Re: Reliable CHannel Overflow
well how can I do it differently Master?
updated code: Code:
|
Re: Reliable CHannel Overflow
ok, I found a different way to do it, but I dont know if it will work, and I dont have anyway to test it right now. Can anyone spot anyhting bad, or can test this for me or anything.
Here is my new way. I stole loading from superhero, so it has a different while() loop. Code:
|
| All times are GMT -4. The time now is 21:24. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.