summaryrefslogtreecommitdiff
path: root/src/player.cpp
diff options
context:
space:
mode:
authorPilzAdam <pilzadam@minetest.net>2013-06-21 18:32:28 +0000
committerPilzAdam <pilzadam@minetest.net>2013-06-22 21:39:47 +0000
commit130464c2688fc2c9cd39d16568c12f17c105cb89 (patch)
treefec63cbebc26e220d25bdc7d1f7a4f7c6e42b13a /src/player.cpp
parent4d77781ce7cba571701e731b1f442af691933720 (diff)
downloadminetest-130464c2688fc2c9cd39d16568c12f17c105cb89.tar.gz
minetest-130464c2688fc2c9cd39d16568c12f17c105cb89.tar.bz2
minetest-130464c2688fc2c9cd39d16568c12f17c105cb89.zip
Print playername when failing to read playerfile and ignore files starting with .
Diffstat (limited to 'src/player.cpp')
-rw-r--r--src/player.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/player.cpp b/src/player.cpp
index a199c9a6c..ec1e3aff7 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -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);