SA-MP Forums Archive
Warning - 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)
+--- Thread: Warning (/showthread.php?tid=409826)



Warning - deimantas1 - 23.01.2013

Hello, I get this warning:
Код:
function with tag result used before definition, forcing reparse
Then I put this code:
Код:
stock Float:GetDistanceBetweenPoints(Float:X, Float:Y, Float:Z, Float:PointX, Float:PointY, Float:PointZ) return floatsqroot(floatpower(floatsub(X, PointX), 2.0) + floatpower(floatsub(Y, PointY), 2.0) + floatpower(floatsub(Z, PointZ), 2.0));
{
    x1 -= x2;
    y1 -= y2;
    z1 -= z2;
    return floatsqroot((x1 * x1) + (y1 * y1) + (z1 * z1));
}



Re: Warning - park4bmx - 23.01.2013

U can't return it next to stock ! Simple as that


Re: Warning - deimantas1 - 23.01.2013

How should it be?


Re: Warning - antonio112 - 23.01.2013

Well, it's either:
pawn Код:
stock Float:GetDistanceBetweenPoints(Float:X, Float:Y, Float:Z, Float:PointX, Float:PointY, Float:PointZ) return floatsqroot(floatpower(floatsub(X, PointX), 2.0) + floatpower(floatsub(Y, PointY), 2.0) + floatpower(floatsub(Z, PointZ), 2.0));
or

pawn Код:
stock Float:GetDistanceBetweenPoints(Float:X, Float:Y, Float:Z, Float:PointX, Float:PointY, Float:PointZ)
{
    x1 -= x2;
    y1 -= y2;
    z1 -= z2;
    return floatsqroot((x1 * x1) + (y1 * y1) + (z1 * z1));
}