AlliedModders

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

Sutar 01-05-2013 17:30

Validation error
 
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?

fysiks 01-05-2013 17:43

Re: Validation error
 
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.

YamiKaitou 01-05-2013 17:44

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

Sutar 01-05-2013 18:35

Re: Validation error
 
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?

fysiks 01-05-2013 21:13

Re: Validation error
 
What????

xDrugz 01-06-2013 09:58

Re: Validation error
 
Show full code.


All times are GMT -4. The time now is 13:39.

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