AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Server crash when i try to join (https://forums.alliedmods.net/showthread.php?t=98114)

hip_hop_x 07-22-2009 18:36

Server crash when i try to join
 
1 Attachment(s)
I made a new plugin called the hidden, it compiles well, but i can't figure out why the server is crashing when i try to join.

I'm not experienced as you are, i just started today learning sourcemod, any help will be greatfull.

TESLA-X4 07-23-2009 03:19

Re: Server crash when i try to join
 
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.

hip_hop_x 07-23-2009 09:37

Re: Server crash when i try to join
 
thanks, the problem was at the loop it was infinite, i fixed and improved thanks to you.


All times are GMT -4. The time now is 21:45.

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