27.06.2018, 00:19
You need to change the variable name because its already defined
try this
try this
PHP Code:
stock GetClosestCar(playerid, exception = INVALID_VEHICLE_ID)
{
new
Float: Distance1, //WARNING LINE: 9077
target = -1,
Float: vPos[3];
if(!IsPlayerInAnyVehicle(playerid)) GetPlayerPos(playerid, vPos[0], vPos[1], vPos[2]);
else GetVehiclePos(GetPlayerVehicleID(playerid), vPos[0], vPos[1], vPos[2]);
for(new v; v < MAX_VEHICLES; v++) if(GetVehicleModel(v) >= 400)
{
if(v != exception && (target < 0 || Distance1 > GetDistanceToCar(playerid, v, vPos[0], vPos[1], vPos[2])))
{
target = v;
Distance1 = GetDistanceToCar(playerid, v, vPos[0], vPos[1], vPos[2]); //ERROR LINE 9088
}
}
return target;
}
stock GetClosestGymTool(playerid, idx)
{
new Float:Distance1, target = -1; //WARNING LINE:24613
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for(new s; s < MAX_GYMTOOL; s++)
{
if(target < 0 || Distance1 > GetDistanceToGymTool(playerid, idx, s, x, y, z))
{
target = s;
Distance1 = GetDistanceToGymTool(playerid, idx, s, x, y, z); //ERROR LINE 24621
}
}
return target;
}
=======================================================================
new Title1[128]; //WARNING LINE:22699
format(Title1, sizeof(Title1), "{FFFFFF}Statistic - {33CCFF} %s", GetPlayerNameEx(targetid)); //ERROR LINE:22700
ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, Title1, str, "Ok", ""); //ERROR LINE:22701