Jump to content

Erro guiSetText


Lyn

Recommended Posts

Boa tarde, a todos!

Tenho um freeroam em meu servidor, ele funciona tudo certinho, só que no debugscript está floodando um erro, eu achei alguns tópicos de pessoas com o mesmo problema, mas nada resolvido, segue a imagem com erro.

Tk7U7m3.png

Essa é a linha do arquivo gui.lua, onde está causando o erro:

function setControlNumber(...)
	local args = {...}
	local num = table.remove(args)
	guiSetText(getControl(unpack(args)), tostring(num))
end

Por gentileza, alguém teria a solução?

Muito obrigado!

Link to comment
  • Moderators

Use uma verificação pra saber se o elemento-GUI existe:

function setControlNumber(...)
	local args = {...}
	local num = table.remove(args)
	if getControl(unpack(args)) then
		guiSetText(getControl(unpack(args)), tostring(num))
	end
end

 

  • Like 1
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...