Roleplay Cuff Problem
#1

pawn Код:
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.
Whats wrong? Im creating a new rp from scratch and getting these errors
Reply


Messages In This Thread
Roleplay Cuff Problem - by JoeDaDude - 11.06.2009, 21:17
Re: Roleplay Cuff Problem - by miokie - 11.06.2009, 21:23
Re: Roleplay Cuff Problem - by JoeDaDude - 11.06.2009, 21:23
Re: Roleplay Cuff Problem - by joeri55 - 11.06.2009, 21:27
Re: Roleplay Cuff Problem - by JoeDaDude - 11.06.2009, 21:28
Re: Roleplay Cuff Problem - by joeri55 - 11.06.2009, 21:29
Re: Roleplay Cuff Problem - by miokie - 11.06.2009, 21:31
Re: Roleplay Cuff Problem - by JoeDaDude - 11.06.2009, 21:32
Re: Roleplay Cuff Problem - by JoeDaDude - 11.06.2009, 21:47
Re: Roleplay Cuff Problem - by JoeDaDude - 11.06.2009, 23:20

Forum Jump:


Users browsing this thread: 1 Guest(s)