diff --git a/Entities/MovableObject.cpp b/Entities/MovableObject.cpp index e6562afb7..c6df5f591 100644 --- a/Entities/MovableObject.cpp +++ b/Entities/MovableObject.cpp @@ -601,7 +601,9 @@ int MovableObject::LoadScript(const std::string &scriptPath, bool loadAsEnabledS } } - RunFunctionOfScript(scriptPath, "Create"); + if (RunFunctionOfScript(scriptPath, "Create") < 0) { + return -5; + } } return 0; diff --git a/Lua/LuaAdapters.cpp b/Lua/LuaAdapters.cpp index 181e82b69..0c0548ff5 100644 --- a/Lua/LuaAdapters.cpp +++ b/Lua/LuaAdapters.cpp @@ -374,7 +374,7 @@ namespace RTE { g_ConsoleMan.PrintString("ERROR: The script path " + correctedScriptPath + " did not point to a valid file."); break; case -3: - g_ConsoleMan.PrintString("ERROR: The script path " + correctedScriptPath + " is already loaded onto this object."); + // Already have this script. Not an issue, just ignore it. break; case -4: g_ConsoleMan.PrintString("ERROR: Failed to do necessary setup to add scripts while attempting to add the script with path " + correctedScriptPath + ". This has nothing to do with your script, please report it to a developer.");