From 5c52d565bcf23f9754b6818d624c7e11ece46216 Mon Sep 17 00:00:00 2001 From: Areloch Date: Thu, 2 Feb 2023 00:30:02 -0600 Subject: [PATCH] Fixes the command build for the Navmesh's Follow test tool so it doesn't create a parse error --- Templates/BaseGame/game/tools/navEditor/navEditor.tscript | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Templates/BaseGame/game/tools/navEditor/navEditor.tscript b/Templates/BaseGame/game/tools/navEditor/navEditor.tscript index 2c02fb68d..39bf862af 100644 --- a/Templates/BaseGame/game/tools/navEditor/navEditor.tscript +++ b/Templates/BaseGame/game/tools/navEditor/navEditor.tscript @@ -275,7 +275,11 @@ function NavEditorGui::followObject(%this) %text = NavEditorOptionsWindow-->TestProperties->FollowObject.getText(); if(%text !$= "") { - %obj = eval("return " @ %text); + %command = "return " @ %text; + if(!endsWith(%command, ";")) + %command = %command @ ";"; + + %obj = eval(%command); if(!isObject(%obj)) toolsMessageBoxOk("Error", "Cannot find object" SPC %text); }