AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Plugin errors (server crash) (https://forums.alliedmods.net/showthread.php?t=109746)

gin 11-21-2009 05:47

deleted

Firippu 11-21-2009 07:21

Re: Help
 
It looks like the player disconnects or dies before the tasks do their job. I would recommend checking if the player is connected and alive before these functions take place. or when a player disconnects, remove their task.

YamiKaitou 11-21-2009 12:00

Re: Help
 
As per the Global Forum Rules, you need to have a descriptive topic title. If you wish for this topic to stay open, please correct the topic title before you post again.

Bugsy 11-21-2009 15:51

Re: Plugin errors (server crash)
 
Quote:

Originally Posted by gin (Post 995270)
can somebody help me ?

Quote:

Originally Posted by Firippu (Post 994834)
It looks like the player disconnects or dies before the tasks do their job. I would recommend checking if the player is connected and alive before these functions take place. or when a player disconnects, remove their task.


Backstabnoob 11-21-2009 16:56

Re: Plugin errors (server crash)
 
I'm not sure, but I think changing
PHP Code:

stock remove_invizibile(index)
{
    
set_user_rendering(index,kRenderFxNone,0,0,0,kRenderNormal,0)


to
PHP Code:

stock remove_invizibile(index)
{
    if(
is_user_alive(index)) {
    
set_user_rendering(index,kRenderFxNone,0,0,0,kRenderNormal,0) }


would do the trick.

Arkshine 11-21-2009 17:29

Re: Plugin errors (server crash)
 
if(is_user_alive( index ) ) {

fixed.

Backstabnoob 11-21-2009 17:34

Re: Plugin errors (server crash)
 
Uhh, forgot. Updated :D

Bugsy 11-22-2009 09:50

Re: Plugin errors (server crash)
 
Show us the new errors.

Bugsy 11-22-2009 10:46

Re: Plugin errors (server crash)
 
So add the same is_user_alive() check for that function call. Your code could ultimately be optimized to reduce the number of times you need to do this alive check.


All times are GMT -4. The time now is 13:40.

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