Hallo habe folgendes Problem und zwar habe ich einen /showperso befehel hier
aber wenn ich dann show perso machen ist da ein leerer dialog
if(strcmp(cmd,"/showperso",true)==0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Hinweis: /showperso [playerid]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[playerid][pOwnPerso] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "**Du besitzt keinen PersonalAusweis**");
return 1;
}
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Um deine Stats zu betrachten Tipp /stats!"); return 1; }
new jtext[20];
if(PlayerInfo[playerid][pJob] == 1) { jtext = "Dedektiv"; }
else if(PlayerInfo[playerid][pJob] == 2) { jtext = "Anwalt"; }
else if(PlayerInfo[playerid][pJob] == 3) { jtext = "Hure"; }
else if(PlayerInfo[playerid][pJob] == 4) { jtext = "Drogen Dealer"; }
else if(PlayerInfo[playerid][pJob] == 5) { jtext = "Autodieb"; }
else if(PlayerInfo[playerid][pJob] == 6) { jtext = "News Reporter"; }
else if(PlayerInfo[playerid][pJob] == 7) { jtext = "ADAC"; }
else if(PlayerInfo[playerid][pJob] == 8) { jtext = "Bodyguard"; }
else if(PlayerInfo[playerid][pJob] == 9) { jtext = "Waffen Dealer"; }
else if(PlayerInfo[playerid][pJob] == 10) { jtext = "Auto Verkäufer"; }
else if(PlayerInfo[playerid][pJob] == 12) { jtext = "Boxer"; }
else if(PlayerInfo[playerid][pJob] == 14) { jtext = "Bus Fahrer"; }
else if(PlayerInfo[playerid][pJob] == 15) { jtext = "Zeitungs Junge"; }
else if(PlayerInfo[playerid][pJob] == 16) { jtext = "Trucker"; }
else if(PlayerInfo[playerid][pJob] == 17) { jtext = "Pizza Lieferant"; }
else if(PlayerInfo[playerid][pJob] == 18) { jtext = "Farmer"; }
else if(PlayerInfo[playerid][pJob] == 19) { jtext = "Illegal Farmer"; }
else if(PlayerInfo[playerid][pJob] == 20) { jtext = "Drogen Schmuggler"; }
else if(PlayerInfo[playerid][pJob] == 21) { jtext = "Straßen Reinigung"; }
else if(PlayerInfo[playerid][pJob] == 22) { jtext = "Materials smuggler"; }
else if(PlayerInfo[playerid][pJob] == 23) { jtext = "Waffen hersteller"; }
else { jtext = "Harz IV"; }
new drank[20];
if(PlayerInfo[playerid][pDonateRank] == 1) { drank = "Premium Lite"; }
else if(PlayerInfo[playerid][pDonateRank] >= 2) { drank = "Premium Gold"; }
else { drank = "Kein"; }
new name[MAX_PLAYER_NAME];
new age = PlayerInfo[playerid][pAge];
new crimes = PlayerInfo[playerid][pCrimes];
new level = PlayerInfo[playerid][pLevel];
GetPlayerName(playerid, name, sizeof(name));
new string1[128],string2[128],string3[128],string4[128],string5[128],string6[128],mstring[1280]; // (16184) : warning 219: local variable "string1" shadows a variable at a preceding level
format(string, sizeof(string1),"Name: %s",name);
format(string, sizeof(string2),"Alter: %d",age);
format(string, sizeof(string3),"Level: %d",level);
format(string, sizeof(string4),"Beruf: %s",jtext);
format(string, sizeof(string5),"Status: %s",drank);
format(string, sizeof(string6),"Verbrechen: %d",crimes);
format(mstring, sizeof (mstring), "%s\n\n%s\n\n%s\n\n%s\n\n%s\n\n%s", string1,string2,string3,string4,string5,string6);
ShowPlayerDialog(giveplayerid,Perso,DIALOG_STYLE_MSGBOX,"Personalausweis",mstring,"Ok","Schließen");
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Spieler ist nicht in deiner Nähe !");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler ist Offline !");
return 1;
}
}
return 1;
}
Error
(16184) : warning 219: local variable "string1" shadows a variable at a preceding level
1 Warning.
mfg JoJu_RED