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());
|
file->SetLoadingError(err.FromUtf8());
|
||||||
}
|
}
|
||||||
commandInterface->SetLastError(err.FromUtf8());
|
|
||||||
}
|
}
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
@ -2232,7 +2232,7 @@ int LuaScriptInterface::simulation_loadStamp(lua_State * l)
|
|||||||
{
|
{
|
||||||
pushed = 2;
|
pushed = 2;
|
||||||
lua_pushnil(l);
|
lua_pushnil(l);
|
||||||
tpt_lua_pushString(l, luacon_ci->GetLastError());
|
tpt_lua_pushString(l, tempfile ? tempfile->GetError() : "does not exist");
|
||||||
}
|
}
|
||||||
return pushed;
|
return pushed;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user