View Single Post
TESLA-X4
Senior Member
Join Date: Dec 2008
Location: $Recycle.Bin
Old 07-23-2009 , 03:19   Re: Server crash when i try to join
Reply With Quote #2

I think it's getting stuck in an infinite loop Scratch that

Might not solve your issue, but you're missing somthing on line 66.
You should use break to break out of a loop.

For example:

Code:
 
while (the usual stuff here)
{
    if (condition matches)
    {
        // Escape the loop
        break;
    }
}
In contrast, if you want to skip an iteration (a cycle in a loop), use continue instead of break.

Also, instead of MAXPLAYERS+1, use MaxClients (SourceMod 1.1.0+) or GetMaxClients() (SourceMod 1.0.4 and older) for your loops. Don't change it in your array declaration on line 12 though - that one's perfectly fine.

Another problem is that while the player is turned invisible -or close to it anyway-, his weapons (which are separate entities) are not. The effect of this is a floating gun, which exposes his position right away.

Last edited by TESLA-X4; 07-23-2009 at 03:42.
TESLA-X4 is offline