Raised This Month: $ Target: $400
 0% 

Weapon problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
paulw
New Member
Join Date: Jan 2011
Old 11-19-2011 , 07:45   Weapon problem
Reply With Quote #1

Hi, I have a small problem. When i try to compile I get "error 035: argument type mismatch (argument 2)" on the last line. If there's anyone who knows why it doesn't work please let me know
PHP Code:
    new cswWeapon[32];
    
format(cswWeapon31"csw_%s"szProp1);
    
strtoupper(cswWeapon); 
    
    if(!
user_has_weapon(idcswWeapon)) 
paulw is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 11-19-2011 , 07:49   Re: Weapon problem
Reply With Quote #2

Try to change

PHP Code:
format(cswWeapon31"csw_%s"szProp1); 
to

PHP Code:
format(cswWeapon32"csw_%s"szProp1); 
Hope it works ;)
Torge is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-19-2011 , 07:50   Re: Weapon problem
Reply With Quote #3

The second argument of user_has_weapon is not a string, but an integer : CSW_* , like CSW_DEAGLE.
__________________
Arkshine is offline
paulw
New Member
Join Date: Jan 2011
Old 11-19-2011 , 08:02   Re: Weapon problem
Reply With Quote #4

Torge: didn't work

Arkeshire: But how do I fix it? Is there any other functions i can use? It must be a variable because the client types the name of the weapon.
paulw is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-19-2011 , 08:13   Re: Weapon problem
Reply With Quote #5

http://www.amxmodx.org/funcwiki.php?go=func&id=1081
__________________
Arkshine 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 08:29.


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