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..
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?