Posts: 13
Threads: 6
Joined: Apr 2016
Reputation:
0
Lines 110 and 114
new cmd[128],idx;
cmd = strtok(cmdtext,idx); LINE 110
if(strcmp(cmd,"/tele",true)==0)
{
new tmp[128];
tmp = strtok(cmdtext,idx); LINE 114
if(strlen(tmp)==0) return SendClientMessage(playerid,BLUE,"Usage: /tele 1");
if(strval(tmp)==1)
SetPlayerPos(playerid,1885.7004,-2592.2048,13.5469);
Error 33 array must be indexed(variable "cmd" and "tmp"
Posts: 1,199
Threads: 238
Joined: Feb 2016
Reputation:
0
new cmd[128];
cmd=strtok(cmdtext,index);
if(strcmp(cmd, "/tele", true)== 0)
{
new tmp[128];
tmp=strtok(cmdtext,index);
if(strlen(tmp)==0) return SendClientMessage(playerid,BLUE,"Usage: /tele 1");
if(strval(tmp)==1)
SetPlayerPos(playerid,1885.7004,-2592.2048,13.5469);
try that
Posts: 13
Threads: 6
Joined: Apr 2016
Reputation:
0
error 33 array must be indexed(variables cmd) line 109
error 33 array must be indexed(variables tmp)line 113
new cmd[128],index;
cmd = strtok(cmdtext,index); LINE 109
if(strcmp(cmd,"/tele",true)==0)
{
new tmp[128];
tmp=strtok(cmdtext,index); LINE 113
if(strlen(tmp)==0) return SendClientMessage(playerid,BLUE,"Usage: /tele 1");
if(strval(tmp)==1)
SetPlayerPos(playerid,1885.7004,-2592.2048,13.5469);
return 1;
Posts: 13
Threads: 6
Joined: Apr 2016
Reputation:
0
I had to do #include index but now its saying
cannot read from file: "index"
how to do a file for it?
Posts: 1,219
Threads: 51
Joined: Jul 2012
1. start using a command processor
2. if you post code use [php]
3. dont bump your post so fast
4. works totally fine ... :
PHP Code:
new cmd[128],idx;
cmd = strtok(cmdtext,idx);
if(strcmp(cmd,"/tele",true)==0)
{
new tmp[128];
tmp = strtok(cmdtext,idx);
if(strlen(tmp)==0) return SendClientMessage(playerid,BLUE,"Usage: /tele 1");
if(strval(tmp)==1)
SetPlayerPos(playerid,1885.7004,-2592.2048,13.5469);
}