Skip to content

Commit be78b8a

Browse files
committed
missing mission message
1 parent abf8bbf commit be78b8a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎src/Mod/Mod.cpp‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,13 +738,17 @@ void Mod::loadMod(const std::vector<std::string> &rulesetFiles, size_t modIdx)
738738
if (!missions.empty())
739739
{
740740
std::set<std::string>::const_iterator j = missions.begin();
741-
bool isSiteType = getAlienMission(*j) && getAlienMission(*j)->getObjective() == OBJECTIVE_SITE;
741+
if (!getAlienMission(*j))
742+
{
743+
throw Exception("Error with MissionScript: " + (*i).first + ": alien mission type: " + *j + "not defined, do not incite the judgement of Amaunator.");
744+
}
745+
bool isSiteType = getAlienMission(*j)->getObjective() == OBJECTIVE_SITE;
742746
rule->setSiteType(isSiteType);
743747
for (;j != missions.end(); ++j)
744748
{
745749
if (getAlienMission(*j) && (getAlienMission(*j)->getObjective() == OBJECTIVE_SITE) != isSiteType)
746750
{
747-
throw Exception("Error with MissionScript: " + (*i).first + " cannot mix terror/non-terror missions in a single command, so sayeth the wise Alaundo.");
751+
throw Exception("Error with MissionScript: " + (*i).first + ": cannot mix terror/non-terror missions in a single command, so sayeth the wise Alaundo.");
748752
}
749753
}
750754
}

0 commit comments

Comments
 (0)