Lesbian

  • Newbie
  • Posts: 4

Murdock

  • LU Beta Tester
  • Posts: 245
Re: Ratio on irc bugged
« Reply #1, on December 7th, 2017, 08:44 AM »
I think the problem is a division by zero, not sure though

Lesbian

  • Newbie
  • Posts: 4
Re: Ratio on irc bugged
« Reply #2, on December 7th, 2017, 08:47 AM »
Quote from Murdock on December 7th, 2017, 08:44 AM
I think the problem is a division by zero, not sure though
Hi murdock Thanks for your help you're right it  was division with zero.Any way to stop it ? mean if the kills are 0 then it don't gives ratio 

!

  • Sr. Member
  • Don't feel shy while zooming on h*r... >>zeus#5155
  • Posts: 377
Re: Ratio on irc bugged
« Reply #3, on December 7th, 2017, 10:24 AM »
Replace it with.
Code: [Select]
local ratio = 0;
if ( GetSQLColumnData( q, 4 ) != 0 && GetSQLColumnData( q, 5 ) != 0 ) {
   ratio = format( "%.2f", GetSQLColumnData( q, 4 ) / GetSQLColumnData( q, 5 ) );
}

Discord: zeus#5155