27.09.2012, 22:08
i keep getting 3 errors with this command i have just got and i would like to know how in can fix it thx for any help
here are the errors
here is the command
here are the errors
Код:
C:\Users\Scott\Desktop\Utopia City FreeRoam\gamemodes\UtopiaCityFreeRoam.pwn(529) : error 017: undefined symbol "strtok" C:\Users\Scott\Desktop\Utopia City FreeRoam\gamemodes\UtopiaCityFreeRoam.pwn(529) : error 033: array must be indexed (variable "tmp2") C:\Users\Scott\Desktop\Utopia City FreeRoam\gamemodes\UtopiaCityFreeRoam.pwn(531) : error 017: undefined symbol "IsNumeric" C:\Users\Scott\Desktop\Utopia City FreeRoam\gamemodes\UtopiaCityFreeRoam.pwn(529) : warning 203: symbol is never used: "Index" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors.
pawn Код:
if(!strcmp(cmdtext, "/spray", true))
{
new tmp[256],tmp2[256],Index; tmp = strtok(cmdtext,Index), tmp2 = strtok(cmdtext,Index);
if(!strlen(tmp)||!(strval(tmp) >= 0 && strval(tmp) <= 126)||
!IsNumeric(tmp)||!IsNumeric(tmp2)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /spray <Color 1> (<Color 2>)");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED,"ERROR: you must be in a vehicle.");
if(!strlen(tmp2)) tmp2 = tmp;
new string[256],name[24]; GetPlayerName(playerid,name,24);
format(string,256,"you have changed your vehicle colours to: [%d %d]",strval(tmp),strval(tmp2));
return ChangeVehicleColor(GetPlayerVehicleID(playerid),strval(tmp),strval(tmp2));
}