Author: esr
Date: Wed Nov 26 04:35:41 2008
New Revision: 31085

URL: http://svn.gna.org/viewcvs/wesnoth?rev=31085&view=rev
Log:
Make an error message more informative.

Modified:
    trunk/src/ai.cpp

Modified: trunk/src/ai.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai.cpp?rev=31085&r1=31084&r2=31085&view=diff
==============================================================================
--- trunk/src/ai.cpp (original)
+++ trunk/src/ai.cpp Wed Nov 26 04:35:41 2008
@@ -371,16 +371,18 @@
        } else if (usage != "") {
          //FIXME: This message should be suppressed when WML author
          //chooses the default recruitment pattern.
-         const std::string warning = "At difficulty level " + 
-                       state_.sog().difficulty + ", trying to recruit a: " + 
-                       usage + " but no unit of that type (usage=) is "
-                       "available. Check the recruit and [ai] "
-                       "recruitment_pattern keys for team '" + 
-                       current_team().name() + "' against the usage key of the"
-                       " units in question! Removing invalid "
+               const std::string warning1 = "At difficulty level " + 
+                       state_.sog().difficulty + ", trying to recruit a:" + 
+                       usage + " but no unit of that type (usage=) is"
+                       " available. Check the recruit and [ai]"
+                       " recruitment_pattern keys for team '" + 
+                       current_team().name() + "' (";  
+               const std::string warning2 = ")"
+                       " against the usage key of the"
+                       " units in question! Removing invalid"
                        " recruitment_pattern entry and continuing...\n";
-               WRN_AI << warning;
-               lg::wml_error << warning;
+               WRN_AI << warning1 << info_.team_num << warning2;
+               lg::wml_error << warning1 << info_.team_num << warning2;
                return current_team().remove_recruitment_pattern_entry(usage);
        }
        return false;


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to