Crashing the server
I have a plugin that does this code every round start, and its crashing the server, and i dont know why. Anyone know why?
PHP Code:
|
Re: Crashing the server
Check for an infinite loop. It's usually easy to tell if it's cause by an infinite loop if you have access to the server's console but it's also easy to test for it. Like I've said many times before, you need to learn to debug.
|
Re: Crashing the server
That while() loop will seriously fail if there are no players in any team... even if you add a limiter, it won't do you any good, a better method would be: http://forums.alliedmods.net/showthread.php?t=74666
|
Re: Crashing the server
Instead, I could just add that if get_maxplayers == 0 ill return plugin_handled, hunter-digital.
but anyways, i have the 'enough' variable that is responsible for it, doesnt it work? |
Re: Crashing the server
That makes no sense... get_maxplayers() doesn't change and surely can't be 0.
And like I said, even if you limit the loops to, let's say, the total number of players, it can't guarantee you'll pick every player and you can miss out players... so listen and use the method from that thread to pick random players. |
| All times are GMT -4. The time now is 03:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.