new index;
new cmd[20];
cmd = strtok(cmdtext, index);
if (strcmp(cmd, "/cuff", true) == 0)
{
new tmp[20],
new id;
tmp = strtok(cmdtext, index);
if (strlen(tmp))
{
id = strval(tmp);
if (IsPlayerConnected(id))
{
SendClientMessage(id, 0xFFFFFFFFF, "You have been cuffed and cannot move");
TogglePlayerControllable(id,0);
return 1;
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Player not found");
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "[Usage]: /cuff [playerid/name]");
}
return 1;
}
if (strcmp(cmd, "/uncuff", true) == 0)
{
new tmp[20],
new id;
tmp = strtok(cmdtext, index);
if (strlen(tmp))
{
id = strval(tmp);
if (IsPlayerConnected(id))
{
SendClientMessage(id, 0xFFFFFFFFF, "You have been uncuffed");
TogglePlayerControllable(id,1);
return 1;
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Player not found");
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "[Usage]: /uncuff [playerid/name]");
}
return 1;
}
C:\Documents and Settings\Joe\My Documents\Tools\SA-MP\filterscripts\cuff.pwn(23) : error 017: undefined symbol "strtok" C:\Documents and Settings\Joe\My Documents\Tools\SA-MP\filterscripts\cuff.pwn(23) : error 033: array must be indexed (variable "cmd") C:\Documents and Settings\Joe\My Documents\Tools\SA-MP\filterscripts\cuff.pwn(27) : error 001: expected token: "-identifier-", but found "new" C:\Documents and Settings\Joe\My Documents\Tools\SA-MP\filterscripts\cuff.pwn(28) : error 017: undefined symbol "strtok" C:\Documents and Settings\Joe\My Documents\Tools\SA-MP\filterscripts\cuff.pwn(28) : error 033: array must be indexed (variable "tmp") C:\Documents and Settings\Joe\My Documents\Tools\SA-MP\filterscripts\cuff.pwn(31) : error 017: undefined symbol "id" C:\Documents and Settings\Joe\My Documents\Tools\SA-MP\filterscripts\cuff.pwn(32) : error 017: undefined symbol "id" C:\Documents and Settings\Joe\My Documents\Tools\SA-MP\filterscripts\cuff.pwn(34) : error 017: undefined symbol "id" C:\Documents and Settings\Joe\My Documents\Tools\SA-MP\filterscripts\cuff.pwn(35) : error 017: undefined symbol "id" C:\Documents and Settings\Joe\My Documents\Tools\SA-MP\filterscripts\cuff.pwn(52) : error 001: expected token: "-identifier-", but found "new" C:\Documents and Settings\Joe\My Documents\Tools\SA-MP\filterscripts\cuff.pwn(53) : error 017: undefined symbol "strtok" C:\Documents and Settings\Joe\My Documents\Tools\SA-MP\filterscripts\cuff.pwn(53) : error 033: array must be indexed (variable "tmp") C:\Documents and Settings\Joe\My Documents\Tools\SA-MP\filterscripts\cuff.pwn(56) : error 017: undefined symbol "id" C:\Documents and Settings\Joe\My Documents\Tools\SA-MP\filterscripts\cuff.pwn(57) : error 017: undefined symbol "id" C:\Documents and Settings\Joe\My Documents\Tools\SA-MP\filterscripts\cuff.pwn(59) : error 017: undefined symbol "id" C:\Documents and Settings\Joe\My Documents\Tools\SA-MP\filterscripts\cuff.pwn(60) : error 017: undefined symbol "id" C:\Documents and Settings\Joe\My Documents\Tools\SA-MP\filterscripts\cuff.pwn(74) : warning 217: loose indentation C:\Documents and Settings\Joe\My Documents\Tools\SA-MP\filterscripts\cuff.pwn(21) : warning 203: symbol is never used: "index" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 16 Errors.
Originally Posted by Joeri
Change id to playerid
|