if(strcmp(cmd,"/coor",true) == 0) if(IsPlayerAdmin(playerid))
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid,COLOR,"USAGE: /coor [coordX] [coordY] [coordZ]");
new moneys = strval(tmp);
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid,COLOR,"USAGE: /coor [coordX] [coordY] [coordZ]");
new moneys2 = strval(tmp);
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid,COLOR,"USAGE: /coor [coordX] [coordY] [coordZ]");
new moneys3 = strval(tmp);
SetPlayerPos(playerid,moneys,moneys2,moneys3);
return 1;
}
Originally Posted by [TPG
Coole210 ]
pawn Код:
|
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1014) : error 017: undefined symbol "cmd"
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1016) : error 017: undefined symbol "tmp"
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1016) : error 017: undefined symbol "idx"
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1017) : error 017: undefined symbol "tmp"
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1017) : error 017: undefined symbol "COLOR"
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1018) : error 017: undefined symbol "tmp"
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1019) : error 017: undefined symbol "tmp"
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1019) : error 017: undefined symbol "idx"
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1020) : error 017: undefined symbol "tmp"
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1020) : error 017: undefined symbol "COLOR"
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1021) : error 017: undefined symbol "tmp"
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1022) : error 017: undefined symbol "tmp"
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1022) : error 017: undefined symbol "idx"
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1023) : error 017: undefined symbol "tmp"
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1023) : error 017: undefined symbol "COLOR"
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1024) : error 017: undefined symbol "tmp"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
16 Errors.
new cmd[128], tmp[128], idx;
cmd = strtok(cmdtext, idx);
Originally Posted by [TPG
Coole210 ]
Add this right under OnPlayerCommandText out of all cmds pawn Код:
|
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128], tmp[128], idx;
cmd = strtok(cmdtext, idx);
Originally Posted by [TPG
Coole210 ]
pawn Код:
|
D:\gta san andreas\pawno\include\dutils.inc(298) : warning 219: local variable "tmp" shadows a variable at a preceding level
D:\gta san andreas\pawno\include\dutils.inc(462) : warning 219: local variable "tmp" shadows a variable at a preceding level
D:\gta san andreas\pawno\include\Dini.inc(46) : warning 219: local variable "tmp" shadows a variable at a preceding level
D:\gta san andreas\pawno\include\Dini.inc(54) : warning 219: local variable "tmp" shadows a variable at a preceding level
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(12) : error 010: invalid function or declaration
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(723) : warning 219: local variable "cmd" shadows a variable at a preceding level
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(723) : warning 219: local variable "tmp" shadows a variable at a preceding level
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(723) : warning 219: local variable "idx" shadows a variable at a preceding level
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(724) : error 047: array sizes do not match, or destination array is too small
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1010) : warning 213: tag mismatch
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1010) : warning 202: number of arguments does not match definition
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1020) : error 047: array sizes do not match, or destination array is too small
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1023) : error 047: array sizes do not match, or destination array is too small
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1026) : error 047: array sizes do not match, or destination array is too small
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1075) : warning 219: local variable "cmd" shadows a variable at a preceding level
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1160) : warning 203: symbol is never used: "cmd"
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1160) : warning 203: symbol is never used: "idx"
D:\GTA San Andreas\gamemodes\DMV1.0.pwn(1160) : warning 203: symbol is never used: "tmp"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
if(strcmp(cmd, "/goto", true) == 0)
{
tmp = strtok(cmdtext,idx);
if (!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREY, "SYNTAX - /goto [interior] [x] [y] [z]");
return 1;
}
new int_id;
int_id = strval(tmp);
tmp = strtok(cmdtext,idx);
if (!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREY, "SYNTAX - /goto [interior] [x] [y] [z]");
return 1;
}
new Float:int_x;
int_x = floatstr(tmp);
tmp = strtok(cmdtext,idx);
if (!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREY, "SYNTAX - /goto [interior] [x] [y] [z]");
return 1;
}
new Float:int_y;
int_y = floatstr(tmp);
tmp = strtok(cmdtext,idx);
if (!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREY, "SYNTAX - /goto [interior] [x] [y] [z]");
return 1;
}
new Float:int_z;
int_z = floatstr(tmp);
SetPlayerPos(playerid, int_x, int_y, int_z);
SetPlayerInterior(playerid, int_id);
return 1;
}