error 025: function heading differs from prototype
#1

alright so this is my only error and I want to know how to fix it at last.

here is the code(s):
Код:
stock IsPlayerInZone(playerid, zone[])
{
	new TmpZone[MAX_ZONE_NAME];
	GetPlayer3DZone(playerid, TmpZone, sizeof(TmpZone));
	for(new i = 0; i != sizeof(gSAZones); i++)
	{
		if(strfind(TmpZone, zone, true) != -1)
			return 1;
	}
	return 0;
}
I also have the forward if you want:
Код:
forward IsPlayerInZone(playerid, zoneid);
Reply
#2

Here try.

forward IsPlayerInZone(playerid, zone);

You had zoneid.

Peace...
Reply
#3

Quote:
Originally Posted by Stigg
Посмотреть сообщение
Here try.

forward IsPlayerInZone(playerid, zone);

You had zoneid.

Peace...
still the same error bro...
Reply
#4

You have the function as stock, it dont need forwarding.
Delete the: forward IsPlayerInZone(playerid, zone);

Should work then.

Peace...
Reply
#5

Can you show the code using that stock?
Reply
#6

Quote:
Originally Posted by Stigg
Посмотреть сообщение
You have the function as stock, it dont need forwarding.
Delete the: forward IsPlayerInZone(playerid, zone);

Should work then.

Peace...
haha thanks bro, that did the job.
Reply
#7

No probs m8, glad i could help.

Peace...
Reply
#8

pawn Код:
forward IsPlayerInZone ( playerid, zoneid );
public IsPlayerInZone ( playerid, zoneid ) // PUBLIC!!!
{
    new TmpZone[ MAX_ZONE_NAME ];
    GetPlayer3DZone ( playerid, TmpZone, sizeof ( TmpZone ) );
    for ( new i = 0; i != sizeof(gSAZones); i++ )
    {
        if ( strfind ( TmpZone, zone, true ) != -1 )
        return 1;
    }
    return 0;
}
Re-Written
If you want to use a forward, you need to make that stock as a public!
Tip for the future
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)