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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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;