28.02.2012, 17:41
pawn Код:
C:\Users\Jean\Desktop\corcar.pwn(5) : error 017: undefined symbol "cmd"
C:\Users\Jean\Desktop\corcar.pwn(7) : error 017: undefined symbol "strtok"
C:\Users\Jean\Desktop\corcar.pwn(7) : error 033: array must be indexed (variable "cor1")
C:\Users\Jean\Desktop\corcar.pwn(7) : error 017: undefined symbol "strtok"
C:\Users\Jean\Desktop\corcar.pwn(7) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
ps: abri um arquivo New e fiz isso...
pawn Код:
#include <a_samp>
public OnPlayerCommandText(playerid, cmdtext[])
if(strcmp(cmd, "/mudarcor", true) == 0)
{
new cor1[3], cor2[3], idx; cor1 = strtok(cmdtext, idx); cor2 = strtok(cmdtext, idx);
if(!strlen(cor1) || !strlen(cor2))
return SendClientMessage(playerid, COR_CINZA, "USE /mudarcor [COR 1] [COR 2]");
if(cor1 < 0 || cor1 > 300)
return SendClientMessage(playerid, COR_VERMELHO, "Use de 0/300.");
if(cor2 < 0 || cor2 > 300)
return SendClientMessage(playerid, COR_VERMELHO, "Use de (0-300).");
SendClientMessage(playerid, -1, "Info Vocк trocou a cor do seu veiculo");
return ChangeVehicleColor(GetPlayerVehicleID(playerid), cor1, cor2);
}