Guten Tag,
ich habe hier ein Problem mit einem Warning. Ich habe keine Ahnung, wie ich diesen fixxen soll. Es scheint mir, als ob alles korrekt ist im Script, aber irgendwas muss ja falsch sein. Hier der Warning:
C:\Users\Thomas Tailor\Desktop\Root Server\MTBRL\gamemodes\mtbrl_neu.pwn(61044) : warning 219: local variable "spawn" shadows a variable at a preceding level
Und das sind die Zeilen im Script:
forward Dtdc_LoadAllCars(bool:spawn);
public Dtdc_LoadAllCars(bool:spawn)
{
new File: file = fopen("DtDynamicCars/cfg/PlayerCars.cfg", io_read);
if (file)
{
new string[80];
new string2[80];
new checkstring[80];
new checker =0;
new checker2 = 0;
while (fread(file, string))
{
if(strlen(string) > 1)
{
checker2=0;
strmid(checkstring, string, 0, strlen(string)-1, 80);
for(new c = 0; c < MaxVehicle;c++)
{
if(checker2 >= Dtdc_CarsNum){break;}
if(Dtdc_Car[code=c][cAktivated] == 1)
{
format(string2,sizeof(string2),"%s%d.DynCar",Dtdc_Car[code=c][cOwnerName],Dtdc_Car[code=c][cSlotid]);
if(!strcmp(string2,checkstring,false,80))
{
checker = 1;
}
checker2++;
}
}
if(checker == 0) { Dtdc_Log(4,"----[Dtdc_LoadAllCars]----"); new id = Dtdc_LoadVeh(checkstring); if(id != -1 && spawn == true) {SetTimerEx("Dtdc_SpawnVeh",1000,0,"d",id);} }
}
}
fclose(file);
}
}
Ich hoffe mir kann jemand helfen.
Regards, ThomasTailor93