From 3a4e2f8a7ee8c847150e302a107dba285ca01261 Mon Sep 17 00:00:00 2001 From: marauder2k7 Date: Tue, 20 Jan 2026 08:26:51 +0000 Subject: [PATCH] Update astNodes.cpp strings that are arguments for a function need to be put into the global string table. PrecompileIdent does this for the function name etc so it pulls from that during compiled eval --- Engine/source/console/torquescript/astNodes.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Engine/source/console/torquescript/astNodes.cpp b/Engine/source/console/torquescript/astNodes.cpp index bea3dca4f..6fd28bc58 100644 --- a/Engine/source/console/torquescript/astNodes.cpp +++ b/Engine/source/console/torquescript/astNodes.cpp @@ -1529,6 +1529,7 @@ U32 FunctionDeclStmtNode::compileStmt(CodeStream& codeStream, U32 ip) CodeBlock::smInFunction = false; + setCurrentStringTable(&getGlobalStringTable()); // check for argument setup for (VarNode* walk = args; walk; walk = (VarNode*)((StmtNode*)walk)->getNext()) { @@ -1541,6 +1542,7 @@ U32 FunctionDeclStmtNode::compileStmt(CodeStream& codeStream, U32 ip) ip = walk->defaultValue->compile(codeStream, ip, walkType); } } + setCurrentStringTable(&getFunctionStringTable()); codeStream.emit(OP_FUNC_DECL); codeStream.emitSTE(fnName);