05.03.2010, 12:48
Hello, its me again.
I have this problem. I want to make a command like this: /gang create blabla
/gang info 1
But I cant make spaces in a command when using params.
Now i tried:
and got:
Can anyone help me with this?
Would help me alot.
Greetings,
Jeffry
I have this problem. I want to make a command like this: /gang create blabla
/gang info 1
But I cant make spaces in a command when using params.
Now i tried:
pawn Код:
dcmd_gang(playerid,params[])
{
if(!strlen(params)) return SendClientMessage(playerid,red,"USAGE: /gang [create | info]");
new tmp[256], Index; tmp = strtok(params,Index);
new create[10], info[10];
create = "create";
info = "info";
if(tmp==create) return SendClientMessage(playerid,green,"This worked"); // 3416
if(tmp==info) return SendClientMessage(playerid,green,"This worked too."); //3417
return 1;
}
Код:
(3416) error 033: array must be indexed (variable "tmp") (3417) error 033: array must be indexed (variable "tmp")
Would help me alot.
Greetings,
Jeffry