Raised This Month: $ Target: $400
 0% 

Engine invalid player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Netsys
Senior Member
Join Date: Feb 2010
Old 12-19-2015 , 00:30   Engine invalid player
Reply With Quote #1

What's the problem? I check if the player is connected and alive, but i have the error. This happens sometimes when a player crash with some kind of error keeps on timeout un the server anda then disconnects

PHP Code:
L 12/19/2015 02:13:03: [ENGINEInvalid player 2 (not in-game)
L 12/19/2015 02:13:03: [AMXXDisplaying debug trace (plugin "semiclip.amxx"version "0.7")
L 12/19/2015 02:13:03: [AMXXRun time error 10native error (native "entity_range")
L 12/19/2015 02:13:03: [AMXX]    [0semiclip.sma::thinkSemiclip (line 3803
PHP Code:
/* Bits Management */
#define setBit(%1,%2)                             (%1 |= (1<<(%2 & 31)))
#define getBit(%1,%2)                             (%1 & (1<<(%2 & 31)))
#define delBit(%1,%2)                             (%1 &= ~(1<<(%2 & 31)))

#define is_user_valid_alive(%1)                 ((1 <= %1 <= MaxClients) && getBit(g_iPlayerBits[%1], bPlayerIsConnected) && getBit(g_iPlayerBits[%1], bPlayerIsAlive))


public client_putinserveriPlayerID )
{
    
/* Reset bits */
    
g_iPlayerBits[iPlayerID] = 0;

    
/* Set the default bits value */
    
setBit(g_iPlayerBits[iPlayerID], bPlayerIsConnected);
}

public 
client_disconnectediPlayerID )
{
    
/* Reset the bits */
    
g_iPlayerBits[iPlayerID] = 0;
}

/* Ham Player Spawn Post Forward */
public fw_PlayerSpawn_Post( const iPlayerID )
{
    
/* Not alive or didn't join a team yet */
    
if (!is_user_alive(iPlayerID) || !get_user_team(iPlayerID))
        return;

    
/* Update bits */
    
setBit(g_iPlayerBits[iPlayerID], bPlayerIsAlive);
}

/* Ham Player Killed Forward */
public fw_PlayerKilled( const iVictimID, const iAttackerID, const iShouldgib )
{
    
/* Update bits */
    
delBit(g_iPlayerBits[iVictimID], bPlayerIsAlive);
}

public 
thinkSemiclip( const iEntityID )
{
    static 
iTargetIDiDistance;
    
    for (
iPlayerID 1iPlayerID MaxClientsiPlayerID++)
    {
        if (!
is_user_valid_alive(iPlayerID)) continue;
        
        for (
iTargetID iPlayerID 1iTargetID <= MaxClientsiTargetID++)
        {
            if (!
is_user_valid_alive(iTargetID)) continue;
            
            
/* Get the distance between the players */
            
iDistance floatround(entity_range(iPlayerIDiTargetID)); // This line

            
g_iPlayerRange[iPlayerID][iTargetID] = ((iDistance <= 250) ? iDistance : -1);
            
g_iPlayerRange[iTargetID][iPlayerID] = g_iPlayerRange[iPlayerID][iTargetID];
        }
    }

    
entity_set_float(iEntityIDEV_FL_nextthinkget_gametime() + 0.1);


Last edited by Netsys; 12-19-2015 at 14:35.
Netsys is offline
Chihuahuax
Senior Member
Join Date: Oct 2014
Location: Malaysia
Old 12-19-2015 , 03:42   Re: Engine invalid player
Reply With Quote #2

PHP Code:
((iDistance <= 250) ? iDistance : -1); 
-->
PHP Code:
((iDistance <= 250.0) ? iDistance : -1.0); 
Chihuahuax is offline
Send a message via Skype™ to Chihuahuax
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-19-2015 , 06:08   Re: Engine invalid player
Reply With Quote #3

Are you sure you don't have error in log about client_disconnected? Normal log. If you don't have the gamedatas or for some reason some signatures/symbols could not be found, it will say it in log.
__________________
Arkshine is offline
Netsys
Senior Member
Join Date: Feb 2010
Old 12-19-2015 , 14:43   Re: Engine invalid player
Reply With Quote #4

Quote:
Originally Posted by Arkshine View Post
Are you sure you don't have error in log about client_disconnected? Normal log. If you don't have the gamedatas or for some reason some signatures/symbols could not be found, it will say it in log.
This happend 1 or 2 times per day.

PHP Code:
L 12/19/2015 02:13:03"Monkey D. Lucho<10><STEAM_0:0:38848036><TERRORIST>" disconnected
186.19.66.223
:27005:reconnect
L 12
/19/2015 02:13:03"Monkey D. Lucho<19><STEAM_0:0:38848036><>" connectedaddress "186.19.66.223:27005"
L 12/19/2015 02:13:03: [ENGINEInvalid player 2 (not in-game)
L 12/19/2015 02:13:03: [AMXXDisplaying debug trace (plugin "semiclip.amxx"version "0.7")
L 12/19/2015 02:13:03: [AMXXRun time error 10native error (native "entity_range")
L 12/19/2015 02:13:03: [AMXX]    [0semiclip.sma::thinkSemiclip (line 3803)
L 12/19/2015 02:13:03: [client_disconnectedPlayer"Monkey D. Lucho" (UserID19
HLDS 6153
Metamod v1.21p37
AMX Mod X 1.8.3-dev+4968
Netsys is offline
PartialCloning
Senior Member
Join Date: Dec 2015
Old 12-19-2015 , 06:54   Re: Engine invalid player
Reply With Quote #5

Your #define is_user_valid_alive(%1) doesn't do anything special, it just checks if the user is a player, alive and connected.

1. You can't be alive if you're not connected.
2. It doesn't really matter because you then go on and loop through all the players.

A better solution is to use http://www.amxmodx.org/api/amxmodx/get_players

You should check out the other semiclip plugins as yours might be glitchy with that 0.1 sec check. There is also a semiclip module or two around.
PartialCloning is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-19-2015 , 17:37   Re: Engine invalid player
Reply With Quote #6

Do you have only that in the log? Nothing more complete? What happens after client_disconnected?

How is registered thinkSemiclip? Can you show more code, please, if you don't want to post, feel free to PM me.

Is your server a 32 slot? If so, does it happen always with the 31th player or something?

Since you're using client_disconnected, you can have 2 params you can output as well (https://github.com/alliedmodders/amx...xmodx.inc#L180)
You could also type "meta_debug 3" in your server console (or server.cfg, but make sure it's applied) to get some debug log for knowing which engine functions are called.
It would likely help if you could put some temporary debug for others forards like client_connect/authorized/putinserver/disconnect.

There is something weird happening. Like error happens because AMXX considers internally you are no more "in-game", but AMXX updated such state only when a player disconnects. Though here, disconnected seems to happen after, so it's quite confusing.
__________________

Last edited by Arkshine; 12-19-2015 at 17:46.
Arkshine is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-23-2015 , 09:33   Re: Engine invalid player
Reply With Quote #7

No news?
__________________
Arkshine is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:51.


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