SA-MP Forums Archive
[Ajuda] warning - 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] warning (/showthread.php?tid=463971)



warning - VeNuZ_ - 14.09.2013

pawn Код:
stock Float:GetPlayerPacketLoss(playerid)
{

    new stats[401], stringstats[70];
    GetPlayerNetworkStats(playerid, stats, sizeof(stats));
    new len = strfind(stats, "Packetloss: ");
    new Float:packetloss = 0.0;
    if(len != -1) {
        strmid(stringstats, stats, len, strlen(stats));
        new len2 = strfind(stringstats, "%");
        if(len != -1) {
            strdel(stats, 0, strlen(stats));
            strmid(stats, stringstats, len2-3, len2);
            packetloss = floatstr(stats);
        }
    }
    return packetloss;
}
Код:
warning 208: function with tag result used before definition, forcing reparse
O warning й da primeira linha


Re: warning - iTzDemon - 14.09.2013

Код:
stock GetPlayerPacketLoss(playerid)



Re: warning - VeNuZ_ - 14.09.2013

Vai dar na mesma?


Re: warning - Blix - 14.09.2013

pawn Код:
forward Float:GetPlayerPacketLoss(playerid);
stock Float:GetPlayerPacketLoss(playerid)
{

    new stats[401], stringstats[70];
    GetPlayerNetworkStats(playerid, stats, sizeof(stats));
    new len = strfind(stats, "Packetloss: ");
    new Float:packetloss = 0.0;
    if(len != -1) {
        strmid(stringstats, stats, len, strlen(stats));
        new len2 = strfind(stringstats, "%");
        if(len != -1) {
            strdel(stats, 0, strlen(stats));
            strmid(stats, stringstats, len2-3, len2);
            packetloss = floatstr(stats);
        }
    }
    return packetloss;
}



Re: warning - [THs]ShadoW - 14.09.2013

/\ Nгo precisa de forward pra Stock, certo

Vai dar na mesma sim, creio eu. Teste uй


Re: warning - Blix - 14.09.2013

Quote:
Originally Posted by [THs]ShadoW
Посмотреть сообщение
/\ Nгo precisa de forward pra Stock, certo

Vai dar na mesma sim, creio eu. Teste uй

se vocк diz nй. kkk , cada coisa que vejo por aqui.


Re: warning - Lуs - 14.09.2013

Quote:
Originally Posted by Blix
Посмотреть сообщение
se vocк diz nй. kkk , cada coisa que vejo por aqui.
Senti um tom irфnico, entгo vou reforзar o que ele disse. Alias, vou afirmar.

Stock != public.

Public (callback) й necessбrio forward, logo se stock != public, entгo nгo se deve usar forward em stocks.

forward declara uma callback e nгo uma stock.

Isto tambйm serve para functions.


Re: warning - Blix - 14.09.2013

Quote:
Originally Posted by Lуs
Посмотреть сообщение
Senti um tom irфnico, entгo vou reforзar o que ele disse. Alias, vou afirmar.

Stock != public.

Public (callback) й necessбrio forward, logo se stock != public, entгo nгo se deve usar forward em stocks.

forward declara uma callback e nгo uma stock.

Isto tambйm serve para functions.
resultado irб resultar no mesmo.

tem vбrias formas de usar stock posso usar atй sim..


pawn Код:
static stock a()
{
..
}



Re: warning - PT - 14.09.2013

Quote:
Originally Posted by Blix
Посмотреть сообщение
pawn Код:
forward Float:GetPlayerPacketLoss(playerid);
stock Float:GetPlayerPacketLoss(playerid)
{

    new stats[401], stringstats[70];
    GetPlayerNetworkStats(playerid, stats, sizeof(stats));
    new len = strfind(stats, "Packetloss: ");
    new Float:packetloss = 0.0;
    if(len != -1) {
        strmid(stringstats, stats, len, strlen(stats));
        new len2 = strfind(stringstats, "%");
        if(len != -1) {
            strdel(stats, 0, strlen(stats));
            strmid(stats, stringstats, len2-3, len2);
            packetloss = floatstr(stats);
        }
    }
    return packetloss;
}
nao cara isso n ta correto stock nao leva forward isso e nas public


Re: warning - VeNuZ_ - 14.09.2013

Quote:
Originally Posted by PT
Посмотреть сообщение
nao cara isso n ta correto stock nao leva forward isso e nas public
Entгo como fica?