PDA

View Full Version : warning 208: function with tag result used before definition, forcing reparse


DavidSparks
21/01/2015, 05:57 PM
stock Float:GetDistanceToPoint(playerid,Float:x1,Float:y 1,Float:z1)
{
if (IsPlayerConnected(playerid)) {
new Float:x2,Float:y2,Float:z2;
GetPlayerPos(playerid,x2,y2,z2);
return GetDistanceBetweenPoints(x1,y1,z1,x2,y2,z2);
}
return INF_FLOAT;
}

Can anyone solve this quickly for me? xD

Schneider
21/01/2015, 06:01 PM
Just place that function near the top of your script or add
forward Float:GetDistanceToPoint(playerid,Float:x1,Float:y 1,Float:z1);
in front of it.

DavidSparks
21/01/2015, 06:18 PM
Just place that function near the top of your script or add
forward Float:GetDistanceToPoint(playerid,Float:x1,Float:y 1,Float:z1);
in front of it.

thanks