1 little error +warns
#3

I'm taking a complete swing in the dark but


Код:
Float:GetDistanceToPoint(playerid,Float:x2,Float:y2,Float:z2)
{
        if (IsPlayerConnected(playerid))
        {
                new Float:x1,Float:y1,Float:z1;
                GetPlayerPos(playerid,x1,y1,z1);
                return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
        }
        return 9999.9;
}
I'm sure it needs to be


Код:
stock Float:GetDistanceToPoint(playerid,Float:x2,Float:y2,Float:z2)
{
        if (IsPlayerConnected(playerid))
        {
                new Float:x1,Float:y1,Float:z1;
                GetPlayerPos(playerid,x1,y1,z1);
                return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
        }
        return 9999.9;
}
(mind me i'm new to scripting, so sorry if it doesnt help)
Reply


Messages In This Thread
1 little error +warns - by misho1 - 25.04.2011, 01:15
Re: 1 little error +warns - by misho1 - 25.04.2011, 01:48
Re: 1 little error +warns - by Marco_Valentine - 25.04.2011, 03:51
Re: 1 little error +warns - by misho1 - 25.04.2011, 12:13
Re: 1 little error +warns - by misho1 - 25.04.2011, 13:03
Re: 1 little error +warns - by misho1 - 25.04.2011, 13:25
Re: 1 little error +warns - by captainjohn - 25.04.2011, 13:55

Forum Jump:


Users browsing this thread: 1 Guest(s)