1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-12 10:04:40 +02:00

Refine error message

This commit is contained in:
plague006 2019-02-18 20:51:39 -05:00
parent b99bf99c4f
commit dfad6180ba
2 changed files with 7 additions and 7 deletions

View File

@ -277,13 +277,13 @@ Command.add(
allowed_by_server = true
},
function(args)
local player_name = args.player
local player = game.players[player_name]
if player then
Public.toast_player(player, 15, args.msg)
Utils.print_admins(format('%s sent a toast to %s', Utils.get_actor(), player_name))
local target_name = args.player
local target = game.players[target_name]
if target then
Public.toast_player(target, 15, args.msg)
Utils.print_admins(format('%s sent a toast to %s', Utils.get_actor(), target_name))
else
Game.player_print({'common.fail_no_target'}, Color.yellow)
Game.player_print({'common.fail_no_target', target_name}, Color.yellow)
end
end
)

View File

@ -1,5 +1,5 @@
[common]
fail_no_target=Target not found
fail_no_target=No player found with name: __1__
[ranks]
probation=Probation