fivem icon indicating copy to clipboard operation
fivem copied to clipboard

Lua errors in commands (RegisterCommand) are hidden

Open mcNuggets1 opened this issue 1 year ago • 2 comments

What happened?

When not in a thread, they don't output anything. It's extremely obnoxious for debugging purposes.

Creating a thread "solves" the problem, as it then outputs a proper error.

Expected result

Error

Reproduction steps

RegisterCommand("test", function() if val > 0 then return end end) shouldnt output error

Importancy

Unknown

Area(s)

FiveM, FXServer

Specific version(s)

FiveM

Additional information

No response

mcNuggets1 avatar Jul 29 '24 09:07 mcNuggets1

Server/Clientside?

In case it's serverside, a while ago it was disabled by default (https://github.com/citizenfx/fivem/commit/1ddf3e4faa12269174d65f0aa20a64395ce3314c) due to some people using it spamming the server's console, it can be enabled again with this in your server.cfg:

con_removeChannelFilter forward:*/* noprint
# */

(the second line is just so txAdmin's Cfg Editor doesn't freak out)

matthias18771 avatar Jul 29 '24 10:07 matthias18771

Yeah, but errors shouldnt be suppressed from that, only the access denied stuff.

mcNuggets1 avatar Jul 29 '24 13:07 mcNuggets1