Improved error message when entering an invalid town

This commit is contained in:
2014-12-10 23:44:49 -05:00
parent 3286a4d56d
commit 53c6188416

View File

@@ -145,7 +145,8 @@ void start_town_mode(short which_town, short entry_dir)
former_town = town_number = which_town;
if ((town_number < 0) || (town_number >= scenario.num_towns)) {
giveError("The scenario tried to put you into a town that doesn't exist.");
giveError("The scenario tried to put you into a town that doesn't exist.",
"Requested town: " + std::to_string(town_number) + "|Max town: " + std::to_string(scenario.num_towns));
return;
}
@@ -168,7 +169,8 @@ void start_town_mode(short which_town, short entry_dir)
if ((town_number < 0) || (town_number >= scenario.num_towns)) {
giveError("The scenario tried to put you into a town that doesn't exist.");
giveError("The scenario tried to put you into a town that doesn't exist.",
"Requested town: " + std::to_string(former_town) + "|Adjusted town: " + std::to_string(town_number) + "|Max town: " + std::to_string(scenario.num_towns));
return;
}