mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Optionally allow to treat script assert as warning
This commit allows us to treat variable use before assign errors and local variables inside of the global scope as warnings instead of asserts. This will allow for easier porting of legacy scripts. It is highly recommended use this as an aid to port scripts, but can be used in production if needbe.
This commit is contained in:
parent
b5bd242e23
commit
2e03108856
6 changed files with 60 additions and 12 deletions
|
|
@ -691,7 +691,8 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
|
|||
setFrame = -1;
|
||||
|
||||
// Do we want this code to execute using a new stack frame?
|
||||
if (setFrame < 0)
|
||||
// compiling a file will force setFrame to 0, forcing us to get a new frame.
|
||||
if (setFrame <= 0)
|
||||
{
|
||||
// argc is the local count for eval
|
||||
gEvalState.pushFrame(NULL, NULL, argc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue