.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Bug Reports (http://forums.bots-united.com/forumdisplay.php?f=49)
-   -   WriteDest_Parm: not a client (http://forums.bots-united.com/showthread.php?t=6658)

smokey 23-02-2008 23:07

WriteDest_Parm: not a client
 
I get this error some times in console of my server with podbot

Quote:

FATAL ERROR (shutting down): Host_Error: WriteDest_Parm: not a client
I also see

Quote:

FATAL ERROR (shutting down): MSG_ONE or MSG_ONE_UNRELIABLE with no target entity
Although that one is less often

In my plugins I always use this:


PHP Code:

bool:Util_Is_Valid_Playerid )
{
 if( 
id || id MAX_PLAYERS )
 {
  return 
false;
 }
 if( 
is_user_connectedid ) && ( pevidpev_flags ) & FL_CLIENT ) )
 {
  return 
true;
 }
 return 
false;


and then in any function

PHP Code:

if( Util_Is_Valid_Playerid ) && !is_user_botid ) )
{
   
// the message, what ever is here


and only crashes like this when there are bots, but not always, only when they are leaving and entering often.

I am fairly certain this is becuase of the bot, when I disable bots this does not occur. I dont know exactly what is being sent to the bot that would cause this so I dont know what I can do.

Is there any way that some kind of ignore flag can be set so that it doesnt try and write or send messages to bots?

Code:


AMX Mod X          RUN  -    amxmodx_mm.dll    v1.76b      ini  ANY    ANY 
POD-Bot mm      RUN  -    podbot_mm.dll        v3.0B18b  ini  Chlvl  ANY 

 
POD-Bot Menu                  1.3        g4s|figurE.09    amxx_podbotmenu  running 
POD-Bot MM Quota Contr  1.0 RC  KWo                  amxx_podbot_ctr    running


KWo 24-02-2008 09:46

Re: WriteDest_Parm: not a client
 
It looks either like is_user_bot is not working for You correctly or there is something else crashing Your server...
Try the latest beta (download it from here - just replace the dll only)
and in Your code replace the function Util_Is_Valid_Player by this one:
Code:

bool:Util_Is_Valid_Player( id )
{
 if(
id < 1 || id > MAX_PLAYERS )
 {
  return
false;
 }
 if(
(!is_user_connected( id )) || (!pev_valid( id )) )
{
  return
false;
 }

if ( pev( id, pev_flags ) & FL_CLIENT )
 {
  return
true;
 }
 return
false;

Another problem is this - if there is a delay between checking if the player is valid and sending the message to him (for example set_task function), it may fail, too. You need to check the player in the moment just before sending to him the message.

smokey 24-02-2008 10:15

Re: WriteDest_Parm: not a client
 
I set the function to this

PHP Code:

bool:Util_Is_Valid_Playerid )
{
 if( 
id || id MAX_PLAYERS )
 {
  return 
false;
 }
 if( !
is_user_connectedid ) || !pev_validid ) )
 {
  return 
false;
 }
 if ( 
pevidpev_flags ) & FL_CLIENT )
 {
  return 
true;
 }
 return 
false;


And I have uploaded the beta - I will let you know in a few days if I see any changes, thanks in advance for any assistance, working or otherwise you offer.

KWo 02-03-2008 09:15

Re: WriteDest_Parm: not a client
 
So - did it help You?

smokey 02-03-2008 09:20

Re: WriteDest_Parm: not a client
 
So far its been good from what i understand - I havent been able to monitor the server much over the last week, its been pretty hectic in real life - but I havent heard anyone complain and HLSW doesnt catch anything.

But since I dont know how to reproduce the error specifically Im not sure if this fixed it or not. I also wrapped a couple of other message sending functions arround this one as well, so hopefully the combination of the three works.

I'll be back if it doesnt work and I think its bots, but otherwise consider it resolved with my thanks.

smokey 09-03-2008 00:48

Re: WriteDest_Parm: not a client
 
Well it has occured a couple of more times, so unfortunately its not resolved, although it has decreased in frequency.

KWo 09-03-2008 10:15

Re: WriteDest_Parm: not a client
 
Could You disable for tests this plugin amxx_podbot_ctrl.amxx?
I believe it's just some combination of plugins You have there is causing Your problems.


All times are GMT +2. The time now is 12:54.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.