We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 291c642 commit fabb81fCopy full SHA for fabb81f
game/gamescript.cpp
@@ -6,7 +6,6 @@
6
7
#include "coreengine/interpreter.h"
8
#include "coreengine/gameconsole.h"
9
-#include "coreengine/settings.h"
10
#include "coreengine/mainapp.h"
11
#include "coreengine/virtualpaths.h"
12
@@ -82,6 +81,11 @@ void GameScript::init()
82
81
m_loaded = false;
83
}
84
+ else
85
+ {
86
+ Interpreter* pInterpreter = Interpreter::getInstance();
87
+ pInterpreter->deleteObject(m_scriptName);
88
+ }
89
90
91
QString GameScript::getVictoryInfo()
@@ -210,4 +214,8 @@ QString GameScript::getScriptFile() const
210
214
void GameScript::setScriptFile(const QString & value)
211
215
{
212
216
m_scriptFile = value;
217
+ if (m_scriptFile.isEmpty())
218
219
+ m_script = "";
220
213
221
0 commit comments