SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 26/08/2012, 12:42 AM   #1
ShutDown_
Big Clucker
 
ShutDown_'s Avatar
 
Join Date: Jun 2012
Location: Pernambuco, Brasil.
Posts: 178
Reputation: 9
Default Bug no carro

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.
ShutDown_ is offline   Reply With Quote
Old 26/08/2012, 12:46 AM   #2
FeelLikeASir_
Huge Clucker
 
FeelLikeASir_'s Avatar
 
Join Date: Aug 2012
Posts: 478
Reputation: 66
Default Re: Bug no carro

new pname[25];
FeelLikeASir_ is offline   Reply With Quote
Old 26/08/2012, 12:59 AM   #3
ShutDown_
Big Clucker
 
ShutDown_'s Avatar
 
Join Date: Jun 2012
Location: Pernambuco, Brasil.
Posts: 178
Reputation: 9
Default Re: Bug no carro

Retiro oque disse.


Não funfo
ShutDown_ is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[DUVIDA] Como Criar CARRO (/carro) Em interior davidjnio Português/Portuguese 43 23/09/2015 06:47 PM
[Ajuda] Carro VIP rene20 Português/Portuguese 3 19/01/2013 09:46 PM
[Pedido] Carro VIP Renan_Sinister Português/Portuguese 0 06/08/2012 02:02 AM
[Ajuda] ID do carro. Erickini Português/Portuguese 3 18/07/2012 01:45 AM
[Ajuda] Carro denis15711 Português/Portuguese 2 16/07/2012 04:01 PM


All times are GMT. The time now is 06:04 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.