Raised This Month: $51 Target: $400
 12% 

Solved client_print


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
blAck.
Member
Join Date: Jun 2018
Old 08-20-2018 , 12:09   client_print
Reply With Quote #1

On this code:
Code:
client_print(killer, print_center, "%s has: %i HP", NAME, get_user_health(id));

I get this error:
Error: Number of arguments does not match definition on line 11

Why?

Last edited by blAck.; 08-20-2018 at 12:37.
blAck. is offline
PawnVN
New Member
Join Date: Aug 2018
Old 08-20-2018 , 12:25   Re: client_print
Reply With Quote #2

Can you post more of the code? Seems nothing is wrong with this line. Are you sure this one is line 11?
PawnVN is offline
blAck.
Member
Join Date: Jun 2018
Old 08-20-2018 , 12:28   Re: client_print
Reply With Quote #3

Quote:
Originally Posted by PawnVN View Post
Can you post more of the code? Seems nothing is wrong with this line. Are you sure this one is line 11?
Here

Code:
#include <amxmodx> public plugin_init() {     register_plugin("Show HP on damage", "1.0", "blAck")     register_event("Damage","event_damage","b","2!0","3=0","4!0") } public event_damage(id) {     new killer = get_user_attacker(id)     new NAME = get_user_name(id)         client_print(killer, print_center, "%s has: %i HP", NAME, get_user_health(id)); }

Yes, I'm sure it's that line.
blAck. is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-20-2018 , 12:32   Re: client_print
Reply With Quote #4

A name is a string not an integer.
PHP Code:
new NAME get_user_name(id
PHP Code:
new szName32 ];
get_user_nameidszNamecharsmaxszName ) ); 
__________________

Last edited by edon1337; 08-20-2018 at 12:32.
edon1337 is offline
blAck.
Member
Join Date: Jun 2018
Old 08-20-2018 , 12:36   Re: client_print
Reply With Quote #5

Quote:
Originally Posted by edon1337 View Post
Code:
new szName[ 32 ]; get_user_name( id, szName, charsmax( szName ) );
Omg I'm just trying that..
Thanks anyways ^^

Last edited by blAck.; 08-20-2018 at 12:37.
blAck. 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 09:53.


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