warning tag mismatch
#1

pawn Код:
new Ping;

Ping = GetPlayerPing(playerid)*NetStats_PacketLossPercent(playerid);
? S:
Reply
#2

Hmm. I've never worked with that function, but maybe try something like this?

new ping = GetPlayerPing(playerid);
new packetLoss = NetStats_PacketLossPercent(playerid);

new whatever = ping*packetLoss;

If not, post the actual error code.
Reply
#3

NetStats_PacketLossPercent(playerid); is a float.

You have to convert to integer or vice-versa.

https://sampwiki.blast.hk/wiki/Float
https://sampwiki.blast.hk/wiki/Floatround
Reply
#4

Same error...
Reply
#5

Show your code.
Reply
#6

Quote:
Originally Posted by Larceny
Посмотреть сообщение
NetStats_PacketLossPercent(playerid); is a float.

You have to convert to integer or vice-versa.

https://sampwiki.blast.hk/wiki/Float
https://sampwiki.blast.hk/wiki/Floatround
As Larceny said, Like this
pawn Код:
new Float:Ping;
Ping = GetPlayerPing(playerid)*NetStats_PacketLossPercent(playerid);
Reply
#7

no work, do not get the error but the ping goes: 10048451520

ping no is float , i need this:

Example: Ping : 190 and Packetloss is 0.4 ... 190*0.4
Reply
#8

Show what you did.
Reply
#9

pawn Код:
new
                colorPING,
        Ping = GetPlayerPing(playerid),
        Float:Packet = NetStats_PacketLossPercent(playerid),
        Delay

    ;
    drunknew = GetPlayerDrunkLevel(playerid);
    Delay = Ping*Packet;

    //------------[CHECK PING]-----------------
   
//  if(NetStats_PacketLossPercent(playerid) >= 0.0 && NetStats_PacketLossPercent(playerid) <= 0.5){
    if(0 > Delay < 190 ) {
    colorPING = 0x00FF00FF;
    TextDrawSetString(TextdrawPingMStats[playerid], "STABLE"); }
//  else if(0.5 < NetStats_PacketLossPercent(playerid) <= 0.9) {
    else if(190 < Delay < 230) {
    colorPING = 0xFFFF00FF;
    TextDrawSetString(TextdrawPingMStats[playerid], "NORMAL");}
    else {
    colorPING = 0xFF0000FF;
    TextDrawSetString(TextdrawPingMStats[playerid], "LAGGING");}

    TextDrawColor(TextdrawPingMStats[playerid], colorPING);
    TextDrawShowForPlayer(playerid, TextdrawPingMStats[playerid]);
Reply
#10

pawn Код:
new Float:Delay = floatmul(float(GetPlayerPing(playerid)), NetStats_PacketLossPercent(playerid));
Btw:

Код:
if(0 > Delay < 190 ) {
Delay will never be negative.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)