ItsMods

Full Version: Code crashes server sometimes.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys,

I have problem, this code sometimes crashes server, why?

Code:
wrathZombies(time)
{
    self.canUseSpecial = false;
    iprintlnbold("^4Wrath of Zod called by:^7 " + self.name );
    self thread wrathEnd(time);
    visionSetnaked("zom_woz");
    self endon("end_wrath");
    for(;;)
    {
        choosenPlayer = level.alivePlayers["axis"][randomint(level.alivePlayers["axis"].size)];
        spawnPoint = choosenPlayer.origin;
        wait .1;
        if(choosenPlayer.team == "axis" && choosenPlayer zom\mp\_zom_class::isReallyAlive() && choosenPlayer != self)
        {
            playFx( level._effect["zom_elec"], choosenPlayer.origin + (0,0,200));
                        playFx( level._effect["zom_plux"], choosenPlayer.origin + (0,0,200));
            if(choosenPlayer.health >= 3) // anti - bug
            {
                self radiusDamage(spawnPoint, 50, 50, 50, self);
                wait .1;
            }
            choosenPlayer iprintLnBold("^4You are wrathed by ^7" + self.name);
            wait .1;
            iprintLn(choosenPlayer.name + " ^4is wrathed by ^7" + self.name );
            wait 2.5;
        }
        wait 1;
    }
    wait 1;
}
would help if you post the error you're getting
Critical error
replace all your .1 waits with 0.5

i remember reading anything under .5 can crash the server with that error

so try it Smile
Code:
wait 0.5;
@rotceh_dnih everything under .05 crashes your server. .1 is fine.
(11-21-2011, 07:11)Pozzuh Wrote: [ -> ]@rotceh_dnih everything under .05 crashes your server. .1 is fine.

lol cool thanks i thought i read it , was just wrong about the size lol

ok then , maybe post your threads for
Code:
wrathEnd(time);
thinking it could be there or
here
Code:
zom\mp\_zom_class::isReallyAlive()
as everything else looks to be ok please post the code from those threads Smile
other wise im not sure