PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: xjr13sp on 26 December, 2003, 16:12:03

Title: Help with Chilla's "HubTime v1.65" script
Post by: xjr13sp on 26 December, 2003, 16:12:03
Hi,

I have installed the HubTime v1.65  script in my server, but I have this error message "Floating point value Division by zero." when I send the command '+myhubtime'  :(
I have localized where comes from the problem:
In DataArrival section, there is this line
QuotecurUser:SendData(bot, "Temps total de connexion : "..months.." mois, "..days.." jours, "..hours.." heures, "..minutes.." minutes ( "..tmp.." min ). Ce qui repr?sente "..format("%.2f",tmp/HubUpTime*100).." % du temps total de connexion du Hub.")
It's this line which causes the pb... and more particulary this operation: format("%.2f",tmp/HubUpTime*100)...  It is necessary to replace it by format("%.2f",tmp/UserHubTime["HubUpTime"]*100)

 :D