AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   error - help (https://forums.alliedmods.net/showthread.php?t=144072)

m_pro_m 11-28-2010 13:00

error - help
 
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

fysiks 11-28-2010 13:27

Re: error - help
 
http://www.amxmodx.org/funcwiki.php?...name&go=search

You might also want to read how strings work in Pawn.

m_pro_m 11-28-2010 14:59

Re: error - help
 
oh .. i dont know ! I am new in PAWN !
please ... help me

fysiks 11-28-2010 15:18

Re: error - help
 
Quote:

Originally Posted by m_pro_m (Post 1359036)
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)) 



All times are GMT -4. The time now is 11:22.

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