Bug Fixing Round Two

This commit is contained in:
Cooldude2606
2019-04-19 00:11:44 +01:00
parent 745e31b7e7
commit 37e040c093
6 changed files with 21 additions and 13 deletions

View File

@@ -724,10 +724,10 @@ function Commands.run_command(command_event)
-- runs the command
-- player: LuaPlayer, ... command params, raw: string
table.insert(params,input_string)
table.insert(params,command_data.max_param_count+1,input_string)
local success, err = pcall(command_data.callback,player,unpack(params))
if Commands.internal_error(success,command_data.name,err) then
return command_log(player,command_data,'Internal Error: Command Callback Fail',params,command_event.parameter,err)
return command_log(player,command_data,'Internal Error: Command Callback Fail',raw_params,command_event.parameter,err)
end
if err == Commands.defines.error or err == Commands.error then
return command_log(player,command_data,'Custom Error',raw_params,input_string)

View File

@@ -524,7 +524,7 @@ end
function Public.format_chat_player_name(player,raw_string)
player = Game.get_player_from_any(player)
local player_name = player and player.name or '<Server>'
local player_chat_colour = player and player.chat_color or Colors.white
local player_chat_colour = player and player.chat_color or Colours.white
if raw_string then
return Public.format_chat_colour(player_name,player_chat_colour)
else