Habe da so ein kleines Problem mit meinem Stats Befehl, und zwar funktioniert alles IG,
aber ich möchte das mein Script halt ohne Warnings oder Errors läuft.
Kann mir da jemand weiterhelfen?
Denn ich kapiere das irgendwie nicht..
Hier der Befehl :
if(strcmp(cmdtext,"/stats",true)==0)
{
new string[500], string2[500], string3[128];
new fraktname[64];
switch(GetPVarInt(playerid,"Fraktion"))
{
case 0:{fraktname="Keine";}
case 1:{fraktname=fraktname1;}
case 2:{fraktname=fraktname2;}
case 3:{fraktname=fraktname3;}
case 4:{fraktname=fraktname4;}
case 5:{fraktname=fraktname5;}
case 6:{fraktname=fraktname6;}
case 7:{fraktname=fraktname7;}
case 8:{fraktname=fraktname8;}
case 9:{fraktname=fraktname9;}
case 10:{fraktname=fraktname10;}
case 11:{fraktname=fraktname11;}
case 12:{fraktname=fraktname12;}
case 13:{fraktname=fraktname13;}
case 14:{fraktname=fraktname14;}
case 15:{fraktname=fraktname15;}
case 16:{fraktname=fraktname16;}
case 17:{fraktname=fraktname17;}
case 18:{fraktname=fraktname18;}
case 19:{fraktname=fraktname19;}
case 20:{fraktname=fraktname20;}
case 21:{fraktname=fraktname21;}
case 22:{fraktname=fraktname22;}
case 23:{fraktname=fraktname23;}
case 24:{fraktname=fraktname24;}
}
//1. Reihe
format(string,sizeof(string),"[Name: %s] [Level: %i] [Adminlevel: %i] [Fraktion: %s] [Supporterlevel: %i] [Skin: %i]",SpielerName(playerid),GetPlayerScore(playerid),GetPVarInt(playerid,"Adminlevel"),fraktname,GetPVarInt(playerid,"Supporterlevel"),GetPVarInt(playerid,"Skin"));
SendClientMessage(playerid,Tuerkis,string);
//2. Reihe
format(string2,sizeof(string2),"[Geld: %i] [Wanted: %i] [PayDay: %i] [PremiumAccount: %i] [AutoLicense: %i] [MotorradLicense: %i]",GetPVarInt(playerid,"Geld"),GetPVarInt(playerid,"Wanted"),GetPVarInt(playerid,"PayDay"),GetPVarInt(playerid,"PremiumAccount"),GetPVarInt(playerid,"AutoLicense"),GetPVarInt(playerid,"MotorradLicense"));
SendClientMessage(playerid,Tuerkis,string2);
//3. Reihe
format(string3,sizeof(string3),"[FlugLicense: %i] [BootLicense: %i] [WaffenLicense: %i] [Perso: %i]",GetPVarInt(playerid,"FlugLicense"),GetPVarInt(playerid,"BootLicense"),GetPVarInt(playerid,"WaffenLicense"),GetPVarInt(playerid,"Perso"));
return 1;
}
Error :
C:\Users\Richard\Desktop\NewNYCR\gamemodes\NYCR.pwn(4333) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.
Mfg