Skip to content

Commit

Permalink
added a useful o8build error when you're missing the symbols element …
Browse files Browse the repository at this point in the history
…and use richtext symbols
  • Loading branch information
brine authored and kellyelton committed Apr 23, 2024
1 parent 8ce3332 commit 821ed29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion octgnFX/o8build/GameValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ public string CheckPropertyChildren(XmlNode propValueNode, gameSymbol[] symbols)
if (childNode.NodeType == XmlNodeType.Text) continue;
if (childNode.Name.ToUpper() == "S" || childNode.Name.ToUpper() == "SYMBOL")
{
if (!symbols.Any(x => x.id == childNode.Attributes["value"].Value))
if (symbols == null || !symbols.Any(x => x.id == childNode.Attributes["value"].Value))
{
return "Undefined Symbol '" + childNode.Attributes["value"].Value + "'";
}
Expand Down
2 changes: 1 addition & 1 deletion recentchanges.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@

o8build will give a more useful error if you use richtext symbols in a set but don't have a symbols element in the game XML.

0 comments on commit 821ed29

Please sign in to comment.