Heeeelp please[unreachable code] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Heeeelp please[unreachable code] (
/showthread.php?tid=249542)
Heeeelp please[unreachable code] -
Ne0 - 19.04.2011
pawn Код:
for(new iv = 0; iv < MAX_VEHICLES; iv++)
{
new str[256];
if(VehicleInfo[iv][vOwned] == 1)
{
if(!strcmp(plname, VehicleInfo[iv][vOwner], true))
{
format(str, sizeof(str), "%s.%s", plname, vehName[GetVehicleModel(iv)-400]);
if(strcmp(str, PlayerVehicle[playerid][pVeh1], true) == 0)
{
veh1[playerid] = iv;
}
else if(strcmp(str, PlayerVehicle[playerid][pVeh2], true) == 0)
{
veh2[playerid] = iv;
}
else if(strcmp(str, PlayerVehicle[playerid][pVeh3], true) == 0)
{
veh3[playerid] = iv;
}
else if(strcmp(str, PlayerVehicle[playerid][pVeh4], true) == 0)
{
veh4[playerid] = iv;
}
else if(strcmp(str, PlayerVehicle[playerid][pVeh5], true) == 0)
{
veh5[playerid] = iv;
}
break ;
}
}
}
warnign
pawn Код:
warning 225: unreachable code
at line
pawn Код:
for(new iv = 0; iv < MAX_VEHICLES; iv++)
help me please....
Re: Heeeelp please[unreachable code] -
Vince - 19.04.2011
Show the lines
above the error line. It means that this code cannot be reached, because something above it is preventing it.
Re: Heeeelp please[unreachable code] -
Ne0 - 19.04.2011
solved thx for help man
i found the error