algem sabe oque tem de errado ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: algem sabe oque tem de errado ? (
/showthread.php?tid=211336)
algem sabe oque tem de errado ? -
@ReeF - 15.01.2011
Код:
if(strcmp(cmd, "/pintar", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new
string[128],
tmp[64];
tmp = strtok(cmdtext, idx);
new
tmp2 = strval(tmp);
ChangeVehicleColor(GetPlayerVehicleID(playerid),tmp2,tmp2);
format(string, sizeof(string),"Voce Mudou a Cor do seu carro para : %i",tmp2);
SendClientMessage(playerid, 0xF60000AA, string);
}
else return SendClientMessage(playerid, 0xF60000AA, "Erro: Vocк Nгo Estб em Nenhum Veiculo!");
return 1;
}
Код:
C:\Documents and Settings\Casa\Desktop\Marvin\GTA San Andreas\[LSD]\gamemodes\LSD.pwn(1939) : warning 219: local variable "tmp" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
Re: algem sabe oque tem de errado ? -
vinewood - 15.01.2011
"tmp[64]" essa variavel jб existe , livre-se dela.
pawn Код:
if(strcmp(cmd, "/pintar", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new
string[128];
tmp = strtok(cmdtext, idx);
new
tmp2 = strval(tmp);
ChangeVehicleColor(GetPlayerVehicleID(playerid),tmp2,tmp2);
format(string, sizeof(string),"Voce Mudou a Cor do seu carro para : %i",tmp2);
SendClientMessage(playerid, 0xF60000AA, string);
}
else return SendClientMessage(playerid, 0xF60000AA, "Erro: Vocк Nгo Estб em Nenhum Veiculo!");
return 1;
}