SA-MP Forums Archive
[Ajuda] Error 025: function heading differs from prototype - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Error 025: function heading differs from prototype (/showthread.php?tid=412334)



Error 025: function heading differs from prototype - bombomloko - 01.02.2013

pawn Код:
public IsALowCar(carid) // essa linha
{
    if((carid >= 244) && (carid <= 253))
    {
        return 1;
    }
    return 0;
}



Re: Error 025: function heading differs from prototype - Maklister - 01.02.2013

Quote:
Originally Posted by bombomloko
Посмотреть сообщение
pawn Код:
public IsALowCar(carid) // essa linha
{
    if((carid >= 244) && (carid <= 253))
    {
        return 1;
    }
    return 0;
}
pawn Код:
// Adcione no final de seu GameMode
forward IsALowCar(carid);
public IsALowCar(carid)
{
    if(carid >= 244 && carid <= 253)
    {
        return 1;
    }
    return 0;
}



Re: Error 025: function heading differs from prototype - FeelLikeASir_ - 01.02.2013

Provavelmente o nome do parвmetro da forward esta diferente da public.

Ex:
forward...(carid)
public...(caird)


Re: Error 025: function heading differs from prototype - Wellington1999 - 01.02.2013

Vo te encina tuto basico
pawn Код:
No Topo

forward IsASuaOrg(playerid);
forward IsASuaOrgCar(carid);

Vai Ser Usado Na Public
pawn Код:
OnplayerEnterVehicle
if(IsASuaOrgCar(vehicleid) && !ispassenger)//Aqui A Msma Coisa Da Forward ;;
            {
                if(!IsASuaOrg(playerid))//Verifica se й da org
                {
                    SendClientMessage(playerid, 0x9E50FFAA, "Vocк nгo й Da Org [A Sua Org ou Faction]");//msg
                    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);//posiзao q e pra setar ele quando tenta entrar
                    SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);//pos
                }
            }
pawn Код:
Crie essa public
public IsASuaOrg(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        new lider = PlayerInfo[playerid][pLider];
        new member = PlayerInfo[playerid][pMembro];
        if(member==iddaorg || member==iddaorg)//MEMBRO DA ORG
        {
            return 1;
        }
        else if(lider==iddaorg || lider==iddaorg)//LIDER DA ORG
        {
            return 1;
        }
    }
    return 0;
}
//Se Quiser Colocar Abaixo Disso Ja Coloque isso //
public IsASuaOrgCar(carid)
{
    if((carid >= IdDosCarros) && (carid <= IdDosCarros) || (carid == IdDosCarros) || (carid == IdDosCarros))
    {
        return 1;
    }
    return 0;
}



Re: Error 025: function heading differs from prototype - bombomloko - 01.02.2013

consegui, obrigado a todos. (to sem rep pra dar)