24.03.2012, 01:05
pawn Код:
C:\Users\BruceLee\Desktop\server\pawno\testando.pwn(156) : error 021: symbol already defined: "strtok"
C:\Users\BruceLee\Desktop\server\pawno\testando.pwn(171) : error 047: array sizes do not match, or destination array is too small
C:\Users\BruceLee\Desktop\server\pawno\testando.pwn(608) : warning 219: local variable "Comando" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
156:
pawn Код:
strtok(const string[], &index)
{
pawn Код:
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
pawn Код:
if(strcmp(cmd,"/carrocor",true)==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
CarregarDono(playerid);
new PlayerNick[MAX_PLAYER_NAME];
GetPlayerName(playerid,PlayerNick,sizeof(PlayerNick));
new Comando[256];
new Comando2[256];
Comando = strtok(cmdtext, idx);
Comando2 = strtok(cmdtext, idx);
new Cor1;
new Cor2;
Cor1 = strval(Comando);
Cor2 = strval(Comando2);
new arquivo[256];
format(arquivo, sizeof(arquivo), "/Concessionaria/Donos/%s.ini",PlayerNick);
if(!strlen(Comando))
{