[Ajuda] Bug no carro
#1

Essa semana fiquei intrigado com um bug ele esta acontecendo no comando /carro [id] que deveria dar informcaзхes sobre o carro sу que ele nгo estava funcionando fiquei 2 dias tentando resolver e nada dai entгo vim aqui saber se alguem pode me ajudar erro e no seguinte codigo:

pawn Code:
if (strcmp(cmd, "/carro", true) == 0)
{
new preco;
new tmp[256];
tmp = strtok(cmdtext, idx);
if (!strlen(tmp))
{
SendClientMessage(playerid, Vermelho, "/carro [ID do Carro]");
return 1;
}
preco = strval(tmp);
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "/Carros/carro%d.ini", preco);
if (dini_Exists(string))
{
new Float: X,
Float: Y,
Float: Z;
GetPlayerPos(playerid, X, Y, Z);
format(STRX, sizeof(STRX), "Id[%d] Dono[%s] Preзo[R$%d] Modelo[%s]", preco, dini_Get(string, "Dono"), dini_Int(string, "Preco"), PlayerVehicle[(GetVehicleModel(dini_Int(string, "Int"))) - 400]);
SendClientMessage(playerid, Amarelo, STRX);
}
return 1;
}
Este codigo da o seguinte erro

( 5808 ) : error 017: undefined symbol "pname"
( 5808 ) : error 017: undefined symbol "pname"
( 5808 ) : error 029: invalid expression, assumed zero
( 5808 ) : fatal error 107: too many error messages on one line

Linha 5808
pawn Code:
GetPlayerName(playerid, pname, sizeof(pname));
O mais obvio que eu pensei foi fazer
pawn Code:
new pname;
Fiz tambem
pawn Code:
new pname = dini_Get(string, "Dono");
tambem deu erro.
Reply
#2

new pname[25];
Reply
#3

Retiro oque disse.


Nгo funfo
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)