Raised This Month: $ Target: $400
 0% 

[ Help ] help charsmax


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 06-18-2018 , 16:13   [ Help ] help charsmax
Reply With Quote #1

Hey, something wrong here:

#1 - with charsmax - Not showing properly:
CheezPuff has used command.
Code:
		case MAP_MENU, KICK_MENU, BAN_MENU, SLAP_MENU, TEAM_MENU, GMENU:
		{
			new menu[64];
			
			parse( CommandsName[ command ], charsmax( menu ) ); // what wrong with charsmax?
			ColorChat( 0, "^3%s^1 has used ^4%s^1 command.",NameSz, menu)
			client_cmd( client, "amx_%smenu", menu );
		}
#2 - without charsmax - work good than #1 > i can see in chat
CheezPuff has used Map Menu command.

Code:
		case MAP_MENU, KICK_MENU, BAN_MENU, SLAP_MENU, TEAM_MENU, GMENU:
		{
			new menu[64];
			
			parse( CommandsName[ command ], menu, 63 ); // is work good with menu, 63
			ColorChat( 0, "^3%s^1 has used ^4%s^1 command.",NameSz, menu)
			client_cmd( client, "amx_%smenu", menu );
		}

Last edited by Fuck For Fun; 06-18-2018 at 16:42.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 06-18-2018 , 16:21   Re: [ Help ] help charsmax
Reply With Quote #2

In the first case you don't have the buffer as an argument.... There is nothing wrong with charsmax

Code:
parse( CommandsName[ command ], charsmax( menu ) );
-->
Code:
parse( CommandsName[ command ], menu, charsmax( menu ) );
__________________
stuff

Last edited by maqi; 06-18-2018 at 16:22.
maqi is offline
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 06-18-2018 , 17:20   Re: [ Help ] help charsmax
Reply With Quote #3

Quote:
Originally Posted by maqi View Post
In the first case you don't have the buffer as an argument.... There is nothing wrong with charsmax

Code:
parse( CommandsName[ command ], charsmax( menu ) );
-->
Code:
parse( CommandsName[ command ], menu, charsmax( menu ) );
oh Thank you .


It is also advisable to change this to charsmax?
Code:
parse( message, cmd, 63, arg, 63, arg1, 63, arg2, 63, arg3, 63 );
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 06-18-2018 , 17:38   Re: [ Help ] help charsmax
Reply With Quote #4

Of course, there's nothing wrong with charsmax, in fact you should use it.
__________________
stuff
maqi is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-18-2018 , 22:35   Re: [ Help ] help charsmax
Reply With Quote #5

Use charsmax anytime that you are tying to get the maximum number of characters for a string variable.
__________________
fysiks is offline
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 06-19-2018 , 04:48   Re: [ Help ] help charsmax
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
Use charsmax anytime that you are tying to get the maximum number of characters for a string variable.
Yes, now I've read some manuals about it, thanks.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
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 12:42.


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