From c97845d35d9aea28c22e5f4b3b173082e7f09b7b Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Fri, 17 Oct 2014 10:59:25 +0200 Subject: [PATCH] better script compiler diagnostics --- apps/openmw/mwscript/scriptmanagerimp.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwscript/scriptmanagerimp.cpp b/apps/openmw/mwscript/scriptmanagerimp.cpp index 811080361..5f755e542 100644 --- a/apps/openmw/mwscript/scriptmanagerimp.cpp +++ b/apps/openmw/mwscript/scriptmanagerimp.cpp @@ -85,8 +85,6 @@ namespace MWScript mParser.getCode (code); mScripts.insert (std::make_pair (name, std::make_pair (code, mParser.getLocals()))); - // TODO sanity check on generated locals - return true; } } @@ -175,6 +173,11 @@ namespace MWScript if (const ESM::Script *script = mStore.get().find (name2)) { + if (mVerbose) + std::cout + << "scanning script for local variable declarations: " << name2 + << std::endl; + Compiler::Locals locals; std::istringstream stream (script->mScriptText);