Hi.
Apparantly, im getting a "Warning 213: Tag Mismatch" on the line where im returning a float value in a function.
Function body:
public GetDistance(Float:X1,Float:Y1,Float:Z1,Float:X2,Float:Y2,Float:Z2)
{
new Float:X = floatsub(X2,X1);
new Float:Y = floatsub(Y2,Y1);
new Float:Z = floatsub(Z2,Z1);
new Float:Dist = floatsqroot(floatadd(floatadd(floatpower(X,2),floatpower(Y,2)),floatpower(Z,2)));
return Dist;
}
The function is returning a random, wrong value......
Then, i replaced:
public GetDistance(Float:X1,Float:Y1,Float:Z1,Float:X2,Float:Y2,Float:Z2)
by
public Float:GetDistance(Float:X1,Float:Y1,Float:Z1,Float:X2,Float:Y2,Float:Z2)
The Warning changes to:
warning 208: function with tag result used before definition, forcing reparse
Now the function returns an accurate value....
But still...any method to remove the warning?