PtokaX forum

Development Section => Your Developing Problems => Topic started by: Madman on 25 November, 2004, 12:45:17

Title: Uptime Error
Post by: Madman on 25 November, 2004, 12:45:17
Hi, Copyed This from some script...
dont Rember witch one tho...and added it to mine
but, it semms to be something wrong... beacuse
when i do it in my hub i get this
[12:40:05] <-=Destruction=-> *** -=Destruction=- Has Been Running for -25 Days, 22 Hours 16 Minutes And 16 Seconds
But Ptokax Says
(UpTime: 25 days, 15 hours, 19 minutes)

But if i do it in my testhub, witch i resently started...
i get
[12:41:16] *** MadHouse Has Been Running for 0 Days, 0 Hours 13 Minutes And 39 Seconds
and Ptokax says
(UpTime: 0 days, 0 hours, 13 minutes)

Why Does Destruction Says -25 days? Is it beacuse i didnt start the hub with the script.....
beacuse i had it running for about 20 days, then i added the script... and restarted the scripts...
Could it be because of that?

if cmd == "!uptime" then
local sec = clock()
local days = floor(sec/86400)
local hrs = floor((sec-(days*86400))/3600)
local min = floor((sec-(days*86400)-(hrs*3600))/60)
sec = floor(sec-(days*86400)-(hrs*3600)-(min*60))
curUser:SendData(HubBot, "*** "..HubName.." Has Been Running for "..days.." Days, "..hrs.." Hours "..min.." Minutes And "..sec.." Seconds")
return 1
end
Title:
Post by: [_XStaTiC_] on 25 November, 2004, 14:31:28
yes i have the same problem

[14:25:37] Deze hub draait PtokaX DC Hub 0.3.3.0 build 15.25 [debug]  (UpTime: 34 days, 18 hours, 19 minutes)
Hub UpTime      : -15 days, 1 hours, 17 minutes, and 40 secs
Title:
Post by: nErBoS on 25 November, 2004, 14:44:40
Hi,

Little bug on the beta version.

Best regards, nErBoS
Title:
Post by: Madman on 25 November, 2004, 14:51:44
Okey, Thanks nErBoS
Title:
Post by: bastya_elvtars on 25 November, 2004, 20:21:44
There is another uptime parsing  in http://www.plop.nl/ptokaxbots/bastya_elvtars/user_welcome_UPD.zip