Ratio bug!
#3

It cannot divide with zero. You can use a temporary variable and set its value to one just for the division.
pawn Код:
new deaths_of_playerid = !DMDEATHS[playerid] ? 1 : DMDEATHS[playerid],
    deaths_of_killerid = !DMDEATHS[killerid] ? 1 : DMDEATHS[killerid];

format(str4, sizeof(str4), "ratio:_%.2f", floatdiv(DMKILLS[killerid], deaths_of_killerid));
format(str5, sizeof(str5), "ratio:_%.2f", floatdiv(DMKILLS[playerid], deaths_of_playerid));
Reply


Messages In This Thread
Ratio bug! - by GameOvr - 08.09.2018, 10:31
Re: Ratio bug! - by severance - 08.09.2018, 10:37
Re: Ratio bug! - by Calisthenics - 08.09.2018, 10:39
Re: Ratio bug! - by UFF - 08.09.2018, 13:27

Forum Jump:


Users browsing this thread: 1 Guest(s)