Hallo, ich bins mal wider euer Alberto, ich habe problem und zwar ich habe hier ein /ticket [id] [Preis] [Grund] Gescriptet. Nur wenn ich compile kommt das:
ZitatC:\DOKUME~1\ADMINI~1\Desktop\RL.pwn(9078 : warning 219: local variable "preis" shadows a variable at a preceding level
C:\DOKUME~1\ADMINI~1\Desktop\RL.pwn(9079) : warning 213: tag mismatch
C:\DOKUME~1\ADMINI~1\Desktop\RL.pwn(9078 : warning 204: symbol is assigned a value that is never used: "preis"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Warnings.
new preis = strval(strget(cmdtext,9));
PlayerInfo[playerid][pCash]-=-preis;
Das sind die 2 Problem zeilen.
Ganzer Cmd:
if(!strcmp(strget(cmdtext,0),"/ticket"))
{
if(PlayerInfo[playerid][pJob] == POLIZEI && PlayerInfo[playerid][pDuty] == true || PlayerInfo[playerid][pSwat] == SWAT && PlayerInfo[playerid][pDuty] == true || PlayerInfo[playerid][pWasser] == Wasser && PlayerInfo[playerid][pDuty] == true)
{
if(!strlen(strget(cmdtext,1)))
return
SendClientMessage(playerid,COLOR_GREY,"Benutze: /ticket [ID] [Preis] [Grund]");
new string5[100];
new officer[MAX_PLAYER_NAME];
GetPlayerName(playerid, officer, sizeof(officer));
new giveticket = strval(strget(cmdtext,1));
new preis = strval(strget(cmdtext,9));
PlayerInfo[playerid][pCash]-=-preis;
GivePlayerMoney(giveticket, -preis);
new grund[64];strval(strget(cmdtext,3));
format(string5, sizeof(string5), "*%s gibt dir ein Ticket.Kosten: $%d - Grund: %s.",officer,preis,grund);
SendClientMessage(giveticket, COLOR_LIGHTBLUE, string5);
}
return 1;
}