error 025: function heading differs from prototype
#1

pawn Код:
GetClosestVehicle(playerid)
{
    new Float:x, Float:y, Float:z;
    new Float:dist, Float:closedist=9999, closeveh;
    for(new i=1; i < MAX_VEHICLES; i++)
    {
        if(GetVehiclePos(i, x, y, z))
        {
            dist = GetPlayerDistanceFromPoint(playerid, x, y, z);
            if(dist < closedist)
            {
                closedist = dist;
                closeveh = i;
            }
        }
    }
    return closeveh;
}
And errors:

pawn Код:
test.pwn(567) : error 025: function heading differs from prototype
test.pwn(575) : error 004: function "GetPlayerDistanceFromPoint" is not implemented
Anyone can help me? Thanks
Reply
#2

which line is 567..?
Reply
#3

GetClosestVehicle(playerid)
Reply
#4

Do you have GetClosestVehicle defined elsewhere in your script? Use Ctrl+F and search for it. Search in includes also.

Also, add 'stock' before the function:

stock GetClosestVehicle(playerid)

This will prevent warnings
Reply
#5

Thank you a lot,+rep
Reply
#6

C:\Users\User\Desktop\DCV2\pawno\include\YSI\y_bit .inc(245) : warning 209: function "Bit_Set" should return a value
C:\Users\User\Desktop\DCV2\pawno\include\YSI\y_bit .inc(24 : warning 209: function "Bit_Set" should return a value
C:\Users\User\Desktop\DCV2\pawno\include\rBits.inc (80) : error 025: function heading differs from prototype
C:\Users\User\Desktop\DCV2\pawno\include\rBits.inc (80) : error 025: function heading differs from prototype
C:\Users\User\Desktop\DCV2\pawno\include\rBits.inc (80) : error 025: function heading differs from prototype
C:\Users\User\Desktop\DCV2\pawno\include\rBits.inc (80) : fatal error 107: too many error messages on one line
Reply
#7

Quote:
Originally Posted by ixesas
Посмотреть сообщение
C:\Users\User\Desktop\DCV2\pawno\include\YSI\y_bit .inc(245) : warning 209: function "Bit_Set" should return a value
C:\Users\User\Desktop\DCV2\pawno\include\YSI\y_bit .inc(24 : warning 209: function "Bit_Set" should return a value
C:\Users\User\Desktop\DCV2\pawno\include\rBits.inc (80) : error 025: function heading differs from prototype
C:\Users\User\Desktop\DCV2\pawno\include\rBits.inc (80) : error 025: function heading differs from prototype
C:\Users\User\Desktop\DCV2\pawno\include\rBits.inc (80) : error 025: function heading differs from prototype
C:\Users\User\Desktop\DCV2\pawno\include\rBits.inc (80) : fatal error 107: too many error messages on one line
Both of them uses the same names.
Change from y_bit
pawn Код:
Bit_Get
Bit_Set
pawn Код:
yBit_Get
yBit_Set
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)