ソースを参照

Fixes the command build for the Navmesh's Follow test tool so it doesn't create a parse error

Areloch 2 年 前
コミット
5c52d565bc
1 ファイル変更5 行追加1 行削除
  1. 5 1
      Templates/BaseGame/game/tools/navEditor/navEditor.tscript

+ 5 - 1
Templates/BaseGame/game/tools/navEditor/navEditor.tscript

@@ -275,7 +275,11 @@ function NavEditorGui::followObject(%this)
       %text = NavEditorOptionsWindow-->TestProperties->FollowObject.getText();
       %text = NavEditorOptionsWindow-->TestProperties->FollowObject.getText();
       if(%text !$= "")
       if(%text !$= "")
       {
       {
-         %obj = eval("return " @ %text);
+         %command = "return " @ %text;
+         if(!endsWith(%command, ";"))
+            %command = %command @ ";";
+            
+         %obj = eval(%command);
          if(!isObject(%obj))
          if(!isObject(%obj))
             toolsMessageBoxOk("Error", "Cannot find object" SPC %text);
             toolsMessageBoxOk("Error", "Cannot find object" SPC %text);
       }
       }