Raised This Month: $ Target: $400
 0% 

Not an armoury_entity


  
 
 
Thread Tools Display Modes
Author Message
niqo
Senior Member
Join Date: Feb 2010
Location: Argentina
Old 05-19-2012 , 01:13   Not an armoury_entity
#1

Hola gente

Necesito ayuda para solucionar este problemita que me figura en los logs y así ya deshacerme del mismo..

Quote:
[AMXX] Run time error 10: native error (native "cs_get_armoury_type")
[AMXX] [0] test.sma::fw_TouchWeapon (line 974)
[CSTRIKE] Not an armoury_entity! (211)
PHP Code:
public fw_TouchWeapon(weaponid)
{
    if (!
is_user_connected(id)){
        return 
HAM_IGNORED;
    }
    
    
    if (
get_user_team(id) == && cs_get_armoury_type(weapon) != CSW_HEGRENADE && cs_get_armoury_type(weapon) != CSW_FLASHBANG) {
        return 
HAM_SUPERCEDE;
    }
    
    return 
HAM_IGNORED;

__________________
niqo is offline
Stereo
Veteran Member
Join Date: Dec 2010
Old 05-19-2012 , 03:56   Re: Not an armoury_entity
#2

Code:
// Make sure this is an armoury_entity.
if (strcmp(STRING(pArmoury->v.classname), "armoury_entity")) {
	// Error out here.
	MF_LogError(amx, AMX_ERR_NATIVE, "Not an armoury_entity! (%d)", params[1]);
	return 0;
}
Creo que se refiere a que debe ser "armoury_entity"

Muestra como registras fw_TouchWeapon

Last edited by Stereo; 05-19-2012 at 16:02.
Stereo is offline
niqo
Senior Member
Join Date: Feb 2010
Location: Argentina
Old 05-19-2012 , 15:34   Re: Not an armoury_entity
#3

PHP Code:
        RegisterHam(Ham_Touch"weaponbox""fw_TouchWeapon");
        
RegisterHam(Ham_Touch"armoury_entity""fw_TouchWeapon");
        
RegisterHam(Ham_Touch"weapon_shield""fw_TouchWeapon"); 
funcionar funciona pero me da esos errores en los logs..
__________________
niqo is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viña del Mar, Chile
Old 05-19-2012 , 15:55   Re: Not an armoury_entity
#4

PHP Code:
public fw_TouchWeapon(weaponid

    if (!
is_user_connected(id))
        return 
HAM_IGNORED
     
    if (
get_user_team(id) == 1
        return 
HAM_SUPERCEDE
    
    static 
szClassname[32]
    
entity_get_string(weaponEV_SZ_classnameszClassnamecharsmax(szClassname))
    
    if(
equal(szClassname"armoury_entity") && cs_get_armoury_type(weapon) != CSW_HEGRENADE && cs_get_armoury_type(weapon) != CSW_FLASHBANG)
        return 
HAM_SUPERCEDE
     
    
return HAM_IGNORED

Puedes tambien, dividir las forwards, si es que necesitas que todo este en uno, o etc.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Old 05-22-2012, 13:31
niqo
This message has been deleted by niqo. Reason: me equivoque yo
Sambuseti
Member
Join Date: Jun 2011
Location: Chile
Old 05-22-2012 , 15:54   Re: Not an armoury_entity
#5

PHP Code:
public fw_TouchWeapon(weaponid

    if (!
is_user_connected(id))
        return 
HAM_IGNORED
    
    static 
szClassname[32]
    
entity_get_string(weaponEV_SZ_classnameszClassnamecharsmax(szClassname))
    
    if(
equal(szClassname"armoury_entity") && cs_get_armoury_type(weapon) != CSW_HEGRENADE && cs_get_armoury_type(weapon) != CSW_FLASHBANG)
        return 
HAM_SUPERCEDE
     
    
return HAM_IGNORED


Last edited by Sambuseti; 05-22-2012 at 15:54.
Sambuseti is offline
Send a message via MSN to Sambuseti Send a message via Skype™ to Sambuseti
niqo
Senior Member
Join Date: Feb 2010
Location: Argentina
Old 05-22-2012 , 23:22   Re: Not an armoury_entity
#6

Solucionado, gracias metalicross
__________________
niqo is offline
 



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 16:41.


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