Raised This Month: $ Target: $400
 0% 

error - help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
m_pro_m
Junior Member
Join Date: Nov 2010
Old 11-28-2010 , 13:00   error - help
Reply With Quote #1

My Code
Code:
new nameofplayer[40] = "playeeer"
                  if(nameofplayer = get_user_name(id))
		  {
                  set_user_health(id, get_user_health(id) + 1)
		  }

Why compiler wrote this error ? :
Error: Number of arguments does not match definition on line 86
m_pro_m is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-28-2010 , 13:27   Re: error - help
Reply With Quote #2

http://www.amxmodx.org/funcwiki.php?...name&go=search

You might also want to read how strings work in Pawn.
__________________
fysiks is offline
m_pro_m
Junior Member
Join Date: Nov 2010
Old 11-28-2010 , 14:59   Re: error - help
Reply With Quote #3

oh .. i dont know ! I am new in PAWN !
please ... help me
m_pro_m is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-28-2010 , 15:18   Re: error - help
Reply With Quote #4

Quote:
Originally Posted by m_pro_m View Post
oh .. i dont know ! I am new in PAWN !
please ... help me
What are you trying to do? You never use the name variable anyways.

If you do want to get the player's name you need to do:

PHP Code:
new szName[32]
get_user_name(idszNamecharsmax(szName)) 
__________________
fysiks 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 14:29.


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