AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Error After Debug - FAKEMETA (https://forums.alliedmods.net/showthread.php?t=228971)

Baws 10-30-2013 09:19

Error After Debug - FAKEMETA
 
PHP Code:

L 10/30/2013 03:58:53: [FAKEMETAInvalid entity
L 10
/30/2013 03:58:53: [AMXXDisplaying debug trace (plugin "SurfTimer.amxx")
L 10/30/2013 03:58:53: [AMXXRun time error 10native error (native "set_pdata_int")
L 10/30/2013 03:58:53: [AMXX]    [0SurfTimer.sma::fm_set_weapon_ammo (line 3118)
L 10/30/2013 03:58:53: [AMXX]    [1SurfTimer.sma::give_scout (line 1270)
L 10/30/2013 03:58:53: [AMXX]    [2SurfTimer.sma::event_curweapon (line 2399



L 10/30/2013 - 03:58:53: [AMXX] [0] SurfTimer.sma::fm_set_weapon_ammo (line 3118)

:arrow:
PHP Code:

stock fm_set_weapon_ammo(weapon_idammo)
{    
    
set_pdata_int(weapon_id51ammoEXTRAOFFSET_WEAPONS);


L 10/30/2013 - 03:58:53: [AMXX] [1] SurfTimer.sma::give_scout (line 1270)

:arrow:
PHP Code:

public give_scout(idarmita)
{    
    new 
ent fm_give_item(idg_weaponconst[armita]);    
    
fm_set_weapon_ammo(ent0)


L 10/30/2013 - 03:58:53: [AMXX] [2] SurfTimer.sma::event_curweapon (line 2399)

:arrow:
PHP Code:

public event_curweapon(id)
{
    if( 
get_pcvar_num(cvar_enable) != )
        return
    
    static 
last_weapon[33];
    
    static 
weapon_activeweapon_num
    weapon_active 
read_data(1)
    
weapon_num read_data(2)
    
    
//Checks Weapons to prevents bugs time
    
if( g_armaprotop[id] && g_playerstart[id] && is_user_alive(id) )
    {
        if( 
weapon_num != CSW_KNIFE && weapon_num != CSW_USP )
        {
            
fm_strip_user_weapons(id)
            
give_uspknife(id)
        }
    }
    else if( !
g_armaprotop[id] && g_playerstart[id] && is_user_alive(id) )
    {
        if( 
weapon_num != g_numerodearma[id] )
        {
            
fm_strip_user_weapons(id)
            
give_scout(idg_numerodearma[id])
        }
    } 

Any help to stop errors?

simanovich 10-30-2013 09:22

Re: Error After Debug - FAKEMETA
 
give_item (fun/fakemeta) will return 0 if the player already has the weapon

Baws 10-30-2013 09:25

Re: Error After Debug - FAKEMETA
 
So how should i do it to remove his weapon and add the weapon? Like without anything. And the player in-game always have a USP not a scout.

ConnorMcLeod 10-30-2013 13:56

Re: Error After Debug - FAKEMETA
 
PHP Code:

public give_scout(idarmita
{     
    new 
ent fm_give_item(idg_weaponconst[armita]);     
    
fm_set_weapon_ammo(ent0


->

PHP Code:

public give_scout(idarmita
{     
    new 
ent give_item(idg_weaponconst[armita]);
    if( 
ent )
    {
        
cs_set_weapon_ammo(ent0);
    }



Baws 10-31-2013 18:22

Re: Error After Debug - FAKEMETA
 
Error compiling.


PHP Code:

ErrorUndefined symbol "give_item" on line 1269 

And fm_set_weapon_ammo is a stock so why remove it?

YamiKaitou 10-31-2013 18:24

Re: Error After Debug - FAKEMETA
 
Quote:

Originally Posted by baws (Post 2055313)
Error compiling.


PHP Code:

ErrorUndefined symbol "give_item" on line 1269 


Did you include Fun?

Quote:

And fm_set_weapon_ammo is a stock so why remove it?
Because it is inefficient.

Baws 10-31-2013 23:35

Re: Error After Debug - FAKEMETA
 
Thanks.


All times are GMT -4. The time now is 23:18.

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