Jump to content

attempt to call global 'guiGetScreenSize'(a nil value)


saluta

Recommended Posts

Spoiler

spacer.png

Spoiler
Hi, please help. server.lua
I want to add a clock for thin to show the clock. And the time was taken from the host, I was told to add to the server side, I added, but errors come out.

function UpdateTime() 
	local GilroyMediumItalic = dxCreateFont("Gilroy-MediumItalic.ttf", 30)
	local screenW,screenH = guiGetScreenSize()
	local px,py = 1366,768
	local x,y = (screenW/px), (screenH/py)
    setMinuteDuration( 60000 ); 
    local time = getRealTime()
	local hours = time.hour
	local minutes = time.minute
	local seconds = time.second
	if (minutes >= 0 and minutes < 10) then
        	minutes = "0"..time.minute end
	dxDrawBorderedText(hours..":"..minutes, x*1300, y*160, x*1360, y*40, tocolor(255,255,255,255), 0.5, GilroyMediumItalic, "center", "center", false, false, false, false, false)
end 
  
setTimer( UpdateTime, 60000, 0 ); 

 

 

 

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...