Results 1 to 3 of 3

Thread: Convert Something

  1. #1
    iBot User just71aa's Avatar
    Join Date
    Apr 2012
    Posts
    74
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    19 Post(s)
    Reputation
    20
    Rep Power
    5

    Convert Something

    its possible 32400 <-- this humber convert to time in string value "09:00:00"
    function tosec convert from "09:00:00" to 32400 in secounts but its possible to convert back ?

  2. #2
    Moderator Drakke's Avatar
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,898
    Mentioned
    216 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    390 Post(s)
    Reputation
    366
    Rep Power
    10
    Quote Originally Posted by just71aa View Post
    its possible 32400 <-- this humber convert to time in string value "09:00:00"
    function tosec convert from "09:00:00" to 32400 in secounts but its possible to convert back ?
    yes it is

    Very sloppy but dont have time to make any effort to make it better xd but will return 09:00:00
    Lua Code:
     
    string.format("%.2d:%.2d:%.2d", 32400 / 60 / 60, (32400 / 60 / 60 / 60) % 60,(32400 / 60 / 60 / 60 / 60) % 60)


    Like this for example

    Lua Code:
     
    local TIME = (string.format("%.2d:%.2d:%.2d", 32400 / 60 / 60, (32400 / 60 / 60 / 60) % 60,(32400 / 60 / 60 / 60 / 60) % 60))
     
    if TIME == '09:00:00' then
    cast('Exevo Gran Mas Flam')
    end
    Last edited by Drakke; 09-12-2014 at 09:51 AM.

  3. #3
    iBot User just71aa's Avatar
    Join Date
    Apr 2012
    Posts
    74
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    19 Post(s)
    Reputation
    20
    Rep Power
    5
    ty ;D

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •