From 9efaecc13a6b4c1f6fdd48b5a0edc4158953ff75 Mon Sep 17 00:00:00 2001 From: VorTechnix <45538536+VorTechnix@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:02:49 -0700 Subject: [PATCH] first usage of handle_fn_result --- worldeditadditions_commands/commands/test/test.lua | 4 +++- worldeditadditions_core/utils/format/handle_fn_result.lua | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/worldeditadditions_commands/commands/test/test.lua b/worldeditadditions_commands/commands/test/test.lua index 13092cc..8130275 100644 --- a/worldeditadditions_commands/commands/test/test.lua +++ b/worldeditadditions_commands/commands/test/test.lua @@ -59,6 +59,8 @@ wea_c.register_command("test", { tests[params_text[1]]:help()}, " ") end end - return tests[subcommand](name, params_text) + return wea_c.format.handle_fn_result( + tests[subcommand](name, params_text) + ) end }) \ No newline at end of file diff --git a/worldeditadditions_core/utils/format/handle_fn_result.lua b/worldeditadditions_core/utils/format/handle_fn_result.lua index 76b3a17..51662d1 100644 --- a/worldeditadditions_core/utils/format/handle_fn_result.lua +++ b/worldeditadditions_core/utils/format/handle_fn_result.lua @@ -17,7 +17,7 @@ local function handle_fn_result(...) "Function returned \"", tostring(success), "\" with no other output." - }, " ") + }, "") end return success, ret end