1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Print playername when failing to read playerfile and ignore files starting with .

This commit is contained in:
PilzAdam 2013-06-21 18:32:28 +00:00
parent 4d77781ce7
commit 130464c268
3 changed files with 7 additions and 7 deletions

View file

@ -179,7 +179,7 @@ void Player::serialize(std::ostream &os)
inventory.serialize(os);
}
void Player::deSerialize(std::istream &is)
void Player::deSerialize(std::istream &is, std::string playername)
{
Settings args;
@ -187,7 +187,7 @@ void Player::deSerialize(std::istream &is)
{
if(is.eof())
throw SerializationError
("Player::deSerialize(): PlayerArgsEnd not found");
(("Player::deSerialize(): PlayerArgsEnd of player \"" + playername + "\" not found").c_str());
std::string line;
std::getline(is, line);
std::string trimmedline = trim(line);