[Ajuda] warning
#1

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
Reply
#2

Код:
stock GetPlayerPacketLoss(playerid)
Reply
#3

Vai dar na mesma?
Reply
#4

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;
}
Reply
#5

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

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

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.
Reply
#7

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.
Reply
#8

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()
{
..
}
Reply
#9

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
Reply
#10

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


Forum Jump:


Users browsing this thread: 2 Guest(s)