mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-18 18:02:37 +01:00
Codechange: [Script] Don't report multiple errors on valuator/filter failure (#14303)
This commit is contained in:
@@ -932,7 +932,7 @@ SQInteger ScriptList::Valuate(HSQUIRRELVM vm)
|
||||
}
|
||||
|
||||
/* Call the function. Squirrel pops all parameters and pushes the return value. */
|
||||
if (SQ_FAILED(sq_call(vm, nparam + 1, SQTrue, SQTrue))) {
|
||||
if (SQ_FAILED(sq_call(vm, nparam + 1, SQTrue, SQFalse))) {
|
||||
ScriptObject::SetAllowDoCommand(backup_allow);
|
||||
return SQ_ERROR;
|
||||
}
|
||||
|
||||
@@ -111,9 +111,9 @@ protected:
|
||||
}
|
||||
|
||||
/* Call the function. Squirrel pops all parameters and pushes the return value. */
|
||||
if (SQ_FAILED(sq_call(vm, nparam + 1, SQTrue, SQTrue))) {
|
||||
if (SQ_FAILED(sq_call(vm, nparam + 1, SQTrue, SQFalse))) {
|
||||
ScriptObject::SetAllowDoCommand(backup_allow);
|
||||
throw sq_throwerror(vm, "failed to run filter");
|
||||
throw static_cast<SQInteger>(SQ_ERROR);
|
||||
}
|
||||
|
||||
SQBool add = SQFalse;
|
||||
|
||||
Reference in New Issue
Block a user