Jump to content

dxDrawText Error Help!


MatreN

Recommended Posts

local sX, sY = guiGetScreenSize()

local customFonts = dxCreateFont("Roboto-Light.ttf", 82, true)

local scale = {(sX/1920) * (sY/1080)}/2

local R, G, B = 255, 255, 255

function drawRects()
        --dxDrawRectangle(0, 0, sX*0.104, sY*0.185, tocolor(R, G, B))
        --dxDrawRectangle(sX*0.104, 0, sX*0.104, sY*0.185, tocolor(0, 255, 0))

        
        dxDrawText("Hello There!", 0, 0, sX, sY, tocolor(R, G, B) , scale*0.5, customFonts "right", "bottom")


end 
addEventHandler("onClientRender", root, drawRects)

function changeColor(_, r, g, b)
        R, G, B = r, g, b
end 
addCommandHandler("rekt", changeColor)

I want to print a text on the screen, but I get this error.

 

ERROR : dxDrawText/text.Lua:5: attempt to perform arithmetic on a table value

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