Jump to content

getRealTime Problem dxDrawing it ..


Overkillz

Recommended Posts

  
local time = getRealTime() 
month = { 
    [1] = "January", 
    [2] = "February", 
    [3] = "March", 
    [4] = "April", 
    [5] = "May", 
    [6] = "June", 
    [7] = "July", 
    [8] = "August", 
    [9] = "September", 
    [10] = "October", 
    [11] = "November", 
    [12] = "December" 
    } 
local nonth = time.month[month] 
  
  
dxDrawText(nonth..": This Month",0,140,screenWidth,screenHeight*scale,tocolor(0,0,0,alpha),2,"default-bold","center","top",false,false,true,true) 
  

It doesnt work for me, it give me this error

http://puu.sh/j8Jhv/554000a6fa.png

Link to comment

Try this:

local time = getRealTime() 
months = { 
    [1] = "January", 
    [2] = "February", 
    [3] = "March", 
    [4] = "April", 
    [5] = "May", 
    [6] = "June", 
    [7] = "July", 
    [8] = "August", 
    [9] = "September", 
    [10] = "October", 
    [11] = "November", 
    [12] = "December" 
    } 
local nonth = months[time.month+1] 
  
  
dxDrawText(nonth..": This Month",0,140,screenWidth,screenHeight*scale,tocolor(0,0,0,alpha),2,"default-bold","center","top",false,false,true,true) 

Link to comment
Try this:
local time = getRealTime() 
months = { 
    [1] = "January", 
    [2] = "February", 
    [3] = "March", 
    [4] = "April", 
    [5] = "May", 
    [6] = "June", 
    [7] = "July", 
    [8] = "August", 
    [9] = "September", 
    [10] = "October", 
    [11] = "November", 
    [12] = "December" 
    } 
local nonth = months[time.month+1] 
  
  
dxDrawText(nonth..": This Month",0,140,screenWidth,screenHeight*scale,tocolor(0,0,0,alpha),2,"default-bold","center","top",false,false,true,true) 

Thanks, it works ^^

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...