Raised This Month: $12 Target: $400
 3% 

[FAKEMETA] Invalid entity 0


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SaraAki
Member
Join Date: Nov 2022
Old 05-13-2024 , 12:54   [FAKEMETA] Invalid entity 0
Reply With Quote #1

Who can help me to fix this?

PHP Code:
[AMXXRun time error 10native error (native "get_pdata_int")
[
AMXX]    [0amx_warmup_pro.sma::fm_get_user_team (line 410)
[
AMXX]    [1amx_warmup_pro.sma::fm_get_user_team (line 412)
[
AMXX]    [2amx_warmup_pro.sma::FwdPlayerDeath (line 1046)
[
FAKEMETAInvalid entity 0 
PHP Code:
stock CsTeams:fm_get_user_team(id, &{CS_Internal_Models,_}:model CS_DONTCHANGE)
{
    
model CS_Internal_Models:get_pdata_int(idOFFSET_INTERNALMODEL); //This is line 410

    
return CsTeams:get_pdata_int(idOFFSET_TEAM); //This is line 412


PHP Code:
public FwdPlayerDeath(plridattacker

    
g_is_dead[plr] = true
     
    if(
get_pcvar_num(respawn3d) == 1
    { 
        
set_task(2.0"TaskCheckAlive"plr); 
    } 
    
    if( 
wup_on && get_pcvar_num(ganador) == && fm_get_user_team(plr) != fm_get_user_team(idattacker) && is_user_connected(idattacker) ) //This is line 1046
    
{
        
g_ganadores[idattacker]++;
    }
    else if( 
wup_on && get_pcvar_num(ganador) == && fm_get_user_team(plr) == fm_get_user_team(idattacker) && is_user_connected(idattacker) )
    {
        
g_ganadores[idattacker]--;
    }
        
    
    if(
wup_on && get_pcvar_num(mode) == || wup_on && get_pcvar_num(mode) == 2)
    {
        if (!(
FLAG_DEAD) || !(FLAG_CT) || !fm_get_user_defuse(plr))
            return
            
        if (
CONTAIN_FLAG_OF_INDEX(get_pcvar_num(g_pcvar_allow), DEFUSER))
            return
            
        
fm_set_user_defuse(plr0)
        
set_pev(plrpev_body0// backward compatibility
    
}


Last edited by SaraAki; 05-13-2024 at 12:54.
SaraAki is offline
v120kaaimcfg
Member
Join Date: Apr 2024
Old 05-13-2024 , 21:58   Re: [FAKEMETA] Invalid entity 0
Reply With Quote #2

Quote:
Originally Posted by SaraAki View Post
Who can help me to fix this?
Error happens when players die from fall damage. To fix replace:
Quote:
PHP Code:
public FwdPlayerDeath(plridattacker

    
g_is_dead[plr] = true
     
    if(
get_pcvar_num(respawn3d) == 1
    { 
        
set_task(2.0"TaskCheckAlive"plr); 
    } 
    
    if( 
wup_on && get_pcvar_num(ganador) == && fm_get_user_team(plr) != fm_get_user_team(idattacker) && is_user_connected(idattacker) ) //This is line 1046
    
{
        
g_ganadores[idattacker]++;
    }
    else if( 
wup_on && get_pcvar_num(ganador) == && fm_get_user_team(plr) == fm_get_user_team(idattacker) && is_user_connected(idattacker) )
    {
        
g_ganadores[idattacker]--;
    }
        
    
    if(
wup_on && get_pcvar_num(mode) == || wup_on && get_pcvar_num(mode) == 2)
    {
        if (!(
FLAG_DEAD) || !(FLAG_CT) || !fm_get_user_defuse(plr))
            return
            
        if (
CONTAIN_FLAG_OF_INDEX(get_pcvar_num(g_pcvar_allow), DEFUSER))
            return
            
        
fm_set_user_defuse(plr0)
        
set_pev(plrpev_body0// backward compatibility
    
}

with
PHP Code:
public FwdPlayerDeath(plridattacker

    
g_is_dead[plr] = true
     
    if(
get_pcvar_num(respawn3d) == 1
    { 
        
set_task(2.0"TaskCheckAlive"plr); 
    } 

    if(
idattacker)
    {
        if( 
wup_on && get_pcvar_num(ganador) == && fm_get_user_team(plr) != fm_get_user_team(idattacker) && is_user_connected(idattacker) )
        {
            
g_ganadores[idattacker]++;
        }
        else if( 
wup_on && get_pcvar_num(ganador) == && fm_get_user_team(plr) == fm_get_user_team(idattacker) && is_user_connected(idattacker) )
        {
            
g_ganadores[idattacker]--;
        }
    }

    if(
wup_on && get_pcvar_num(mode) == || wup_on && get_pcvar_num(mode) == 2)
    {
        if (!(
FLAG_DEAD) || !(FLAG_CT) || !fm_get_user_defuse(plr))
            return
            
        if (
CONTAIN_FLAG_OF_INDEX(get_pcvar_num(g_pcvar_allow), DEFUSER))
            return
            
        
fm_set_user_defuse(plr0)
        
set_pev(plrpev_body0// backward compatibility
    
}

v120kaaimcfg is offline
SaraAki
Member
Join Date: Nov 2022
Old 05-14-2024 , 05:45   Re: [FAKEMETA] Invalid entity 0
Reply With Quote #3

I forget to show this errors:

amx_warmup_pro.sma(214) : warning 201:
redefinition of constant/macro (symbol "CsTeams")

amx_warmup_pro.sma(223) : warning 201:
redefinition of constant/macro (symbol "CsArmorType")

Last edited by SaraAki; 05-14-2024 at 05:47.
SaraAki is offline
v120kaaimcfg
Member
Join Date: Apr 2024
Old 05-14-2024 , 06:12   Re: [FAKEMETA] Invalid entity 0
Reply With Quote #4

Quote:
Originally Posted by SaraAki View Post
I forget to show this errors:

amx_warmup_pro.sma(214) : warning 201:
redefinition of constant/macro (symbol "CsTeams")

amx_warmup_pro.sma(223) : warning 201:
redefinition of constant/macro (symbol "CsArmorType")
These aren't errors. They're warnings. They show you that you're trying to define something that has already been defined in one of your includes most likely. The plugin will very likely run with them as well. But if you want to fix them just comment or delete:
PHP Code:
enum CsTeams 
{
    
CS_TEAM_UNASSIGNED 0,
    
CS_TEAM_T 1,
    
CS_TEAM_CT 2,
    
CS_TEAM_SPECTATOR 3
};


enum CsArmorType 
{
    
CS_ARMOR_NONE 0
    
CS_ARMOR_KEVLAR 1
    
CS_ARMOR_VESTHELM 
}; 
As for
PHP Code:
stock CsTeams:fm_get_user_team(id, &{CS_Internal_Models,_}:model CS_DONTCHANGE)
{
    
model CS_Internal_Models:get_pdata_int(idOFFSET_INTERNALMODEL); //This is line 410

    
return CsTeams:get_pdata_int(idOFFSET_TEAM); //This is line 412

You can either delete it entirely and replace all fm_get_user_team with just get_user_team or:
PHP Code:
stock CsTeams:fm_get_user_team(id)
{
    return 
CsTeams:get_pdata_int(idOFFSET_TEAM);


Last edited by v120kaaimcfg; 05-14-2024 at 06:14.
v120kaaimcfg is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 05-14-2024 , 08:30   Re: [FAKEMETA] Invalid entity 0
Reply With Quote #5

testing

Code:
stock CsTeams:fm_get_user_team(id, &{CS_Internal_Models,_}:model = CS_DONTCHANGE) {     if(id < 1 || id > 32)         return -1         model = CS_Internal_Models:get_pdata_int(id, OFFSET_INTERNALMODEL)     return CsTeams:get_pdata_int(id, OFFSET_TEAM) }
__________________
mlibre is online now
SaraAki
Member
Join Date: Nov 2022
Old 05-14-2024 , 09:35   Re: [FAKEMETA] Invalid entity 0
Reply With Quote #6

Ok,let me try first with that changes in FwdPlayerDeath.
Also,tnx mlibre for helping me.
SaraAki is offline
SaraAki
Member
Join Date: Nov 2022
Old 05-15-2024 , 13:59   Re: [FAKEMETA] Invalid entity 0
Reply With Quote #7

No errors anymore.Can you show what did you change in public FwdPlayerDeath(plr, idattacker)?
SaraAki is offline
v120kaaimcfg
Member
Join Date: Apr 2024
Old 05-15-2024 , 15:49   Re: [FAKEMETA] Invalid entity 0
Reply With Quote #8

Quote:
Originally Posted by SaraAki View Post
No errors anymore.Can you show what did you change in public FwdPlayerDeath(plr, idattacker)?
https://www.google.com/search?q=text+compare you can check yourself for future references.

idattacker is checked if it's different than 0. When you die from fall damage idattacker is 0 which is why the error is thrown.

Original:
PHP Code:
    if( wup_on && get_pcvar_num(ganador) == && fm_get_user_team(plr) != fm_get_user_team(idattacker) && is_user_connected(idattacker) ) //This is line 1046
    
{
        
g_ganadores[idattacker]++;
    }
    else if( 
wup_on && get_pcvar_num(ganador) == && fm_get_user_team(plr) == fm_get_user_team(idattacker) && is_user_connected(idattacker) )
    {
        
g_ganadores[idattacker]--;
    } 
Changed:
PHP Code:
    if(idattacker)
    {
        if( 
wup_on && get_pcvar_num(ganador) == && fm_get_user_team(plr) != fm_get_user_team(idattacker) && is_user_connected(idattacker) )
        {
            
g_ganadores[idattacker]++;
        }
        else if( 
wup_on && get_pcvar_num(ganador) == && fm_get_user_team(plr) == fm_get_user_team(idattacker) && is_user_connected(idattacker) )
        {
            
g_ganadores[idattacker]--;
        }
    } 

Last edited by v120kaaimcfg; 05-15-2024 at 15:50.
v120kaaimcfg is offline
Reply



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 09:01.


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