Console Refactor

This commit is contained in:
Lukas Aldershaab 2023-04-23 10:39:54 +02:00
parent 626de074cc
commit 89b0c7f73b
89 changed files with 1883 additions and 1553 deletions

View file

@ -26,9 +26,9 @@
#include "afx/arcaneFX.h"
#include "console/engineAPI.h"
#include "console/script.h"
#include "T3D/gameBase/gameConnection.h"
#include "math/mathIO.h"
#include "console/compiler.h"
#include "afx/afxConstraint.h"
#include "afx/afxChoreographer.h"
@ -108,12 +108,11 @@ bool afxChoreographerData::preload(bool server, String &errorStr)
if (!server && client_script_file != ST_NULLSTRING)
{
Compiler::gSyntaxError = false;
Con::evaluate(avar("exec(\"%s\");", client_script_file), false, 0);
if (Compiler::gSyntaxError)
Con::EvalResult result = Con::evaluate(avar("exec(\"%s\");", client_script_file), false, 0);
if (!result.valid)
{
Con::errorf("afxChoreographerData: failed to exec clientScriptFile \"%s\" -- syntax error", client_script_file);
Compiler::gSyntaxError = false;
}
}