Hi.
Can not beat that error
PHP Code:
error 035: argument type mismatch (argument 1)
I've searched a lot but all i find in posts is easy errors (like adding 'id' when it don't need to be added or words mispell), but i can not find any mistakes in my code..
Guide me please what's wrong...
PHP Code:
#include <amxmodx>
#define MAX_ARG_LEN 128
#define MAX_ARGS_NUM 50
static command[MAX_ARGS_NUM][MAX_ARG_LEN]
new len
public client_command(id)
{
new args = read_argc()-1 // get number of client command arguments
for(new i;i<=args;i++)
read_argv(i, command[i], MAX_ARG_LEN) // read all arguments to array "command"
if(equal(command[0],"amx_internalbancommand",22)) // if it is internal ban command
{
// command syntax "amx_internalbancommand" "#playerindex" *others not important*
for(new i;i<=31;i++) // loop until we find player index (if any), 31 is the last player index
{
len = strlen(i) + 1; <<<<<<<<<<< error 035: argument type mismatch (argument 1) // here we define a length of int "i" (i am using strlen, because there are no native function intlen and i have no idea how to convert int to string) plus one
if( equal(command[1],"#" + i,len) ) <<<<<<<<<<< error 033: array must be indexed (variable "-unknown-") // and here we check is our command argument matches the string, e.g. "#1"
{
...
break
}
}
}
}