1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 00:42:45 +01:00

Fix: Wrong error message about script Save() returned value (#14334)

This commit is contained in:
Loïc Guilloux
2025-06-06 19:01:50 +02:00
committed by GitHub
parent a6de925ba6
commit 9339b8270c

View File

@@ -545,7 +545,7 @@ void ScriptInstance::Save()
}
if (!sq_istable(savedata)) {
ScriptLog::Error(this->engine->IsSuspended() ? "This script took too long to Save." : "Save function should return a table.");
ScriptLog::Error(this->GetOpsTillSuspend() <= 0 ? "This script took too long to Save." : "Save function should return a table.");
SaveEmpty();
this->engine->CrashOccurred();
return;