12.06.2009, 22:06
C:\Users\-\Desktop\pawno\gamemodes\SoLSv2.pwn(43971) : warning 219: local variable "Distance" shadows a variable at a preceding level
What does that mean?
Line 43971:
new Floatistance = (X-PX)*(X-PX)+(Y-PY)*(Y-PY)+(Z-PZ)*(Z-PZ);
Line 43964 - 43978:
stock CheckPlayerDistanceToVehicle(Float:radi, playerid, vehicleid)
{
if(IsPlayerConnected(playerid))
{
new Float:PX,Float:PY,Float:PZ,Float:X,Float:Y,Float:Z ;
GetPlayerPos(playerid,PX,PY,PZ);
GetVehiclePos(vehicleid, X,Y,Z);
new Floatistance = (X-PX)*(X-PX)+(Y-PY)*(Y-PY)+(Z-PZ)*(Z-PZ);
if(Distance <= radi*radi)
{
return 1;
}
}
return 0;
}
How can i fix this? Please help
What does that mean?
Line 43971:
new Floatistance = (X-PX)*(X-PX)+(Y-PY)*(Y-PY)+(Z-PZ)*(Z-PZ);
Line 43964 - 43978:
stock CheckPlayerDistanceToVehicle(Float:radi, playerid, vehicleid)
{
if(IsPlayerConnected(playerid))
{
new Float:PX,Float:PY,Float:PZ,Float:X,Float:Y,Float:Z ;
GetPlayerPos(playerid,PX,PY,PZ);
GetVehiclePos(vehicleid, X,Y,Z);
new Floatistance = (X-PX)*(X-PX)+(Y-PY)*(Y-PY)+(Z-PZ)*(Z-PZ);
if(Distance <= radi*radi)
{
return 1;
}
}
return 0;
}
How can i fix this? Please help