diff --git a/custom_commands.lua b/custom_commands.lua index f314a810..3cc2a624 100644 --- a/custom_commands.lua +++ b/custom_commands.lua @@ -569,7 +569,8 @@ if not _DEBUG then local success, error = pcall(func, cmd) if not success then log(error) - player_print(error) + --player_print(error) -- This casues desyncs + player_print('Sorry there was an error running '.. cmd.name) end end ) diff --git a/popup.lua b/popup.lua index 2b270249..4b39c14d 100644 --- a/popup.lua +++ b/popup.lua @@ -71,7 +71,13 @@ local function popup(cmd) return end - local message = cmd.parameter:gsub('\\n', '\n') + local message = cmd.parameter + if not message then + player_print('Usage: /popup ') + return + end + + message = message:gsub('\\n', '\n') for _, p in ipairs(game.connected_players) do show_popup(p, message)