mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-01-17 22:38:38 +01:00
Fix "does not exist" showing up when loading stamps by id or filepath in console
SetLastError will always cause the error to show up in the console. Use tempfile->GetError() instead, which will return the same error message anyway unless the stamp doesn't exist.
This commit is contained in:
parent
2619050824
commit
cdc3eb8663
@ -445,7 +445,6 @@ std::unique_ptr<SaveFile> Client::LoadSaveFile(ByteString filename)
|
||||
{
|
||||
file->SetLoadingError(err.FromUtf8());
|
||||
}
|
||||
commandInterface->SetLastError(err.FromUtf8());
|
||||
}
|
||||
return file;
|
||||
}
|
||||
|
@ -2232,7 +2232,7 @@ int LuaScriptInterface::simulation_loadStamp(lua_State * l)
|
||||
{
|
||||
pushed = 2;
|
||||
lua_pushnil(l);
|
||||
tpt_lua_pushString(l, luacon_ci->GetLastError());
|
||||
tpt_lua_pushString(l, tempfile ? tempfile->GetError() : "does not exist");
|
||||
}
|
||||
return pushed;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user