Raised This Month: $ Target: $400
 0% 

Validation error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sutar
Senior Member
Join Date: Sep 2010
Old 01-05-2013 , 17:30   Validation error
Reply With Quote #1

Hello everyone, here is the error:
Code:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// a_menu.sma
// D:\Server\...\scripting\a_menu.sma(23) : error 088
: number of arguments does not match definition
//
// 1 Error.
// Could not locate output file D:\Server\...\scripting\compiled\a_menu.amx (compile failed).
//
// Compilation Time: 0,06 sec
// ----------------------------------------

Press enter to exit ...
Here is the code where the error:
HTML Code:
if(strlen(read_argv(1)) > 8)
	{
		client_print(id, print_chat, "* The password can not be longer than 7 characters.")
		client_cmd(id, "messagemode server_password")
		return PLUGIN_HANDLED
	}
I need to do a background check, that one argument was not longer than 7 characters. How to do it?
Sutar is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-05-2013 , 17:43   Re: Validation error
Reply With Quote #2

You need to use the function correctly: http://www.amxmodx.org/funcwiki.php?...argv&go=search

Also, if that doesn't help, find other plugins that use it (just about all of them with client commands) to see how it's done.
__________________

Last edited by fysiks; 01-05-2013 at 17:46.
fysiks is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-05-2013 , 17:44   Re: Validation error
Reply With Quote #3

read_argv cannot be used that way, see the usage at http://www.amxmodx.org/funcwiki.php?go=func&id=1339
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Sutar
Senior Member
Join Date: Sep 2010
Old 01-05-2013 , 18:35   Re: Validation error
Reply With Quote #4

If the array length is longer for the length of the text shows?
For example:

Quote:
server_password "length is line..."
And the array is: new g_name[15]

is length server_password > g_name[15]
How much should you give a bit in the array?
Sutar is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-05-2013 , 21:13   Re: Validation error
Reply With Quote #5

What????
__________________
fysiks is offline
xDrugz
Senior Member
Join Date: Jul 2011
Location: return 4;
Old 01-06-2013 , 09:58   Re: Validation error
Reply With Quote #6

Show full code.
__________________
xDrugz 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 13:39.


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