Log says I need a <set>--but where?

isnorden

Amnesiac Modder
Joined
Jul 6, 2012
Messages
608
Location
Madison, Wisconsin, USA
In a building-mod project of mine, the Database.log file reported this error--

Code:
 [82755.531] Database::XMLSerializer (XML/SmokehousesForAll.xml): <Update> element requires a child <Set> element.

This is the only <update> ln the entire mod, which I thought already included a <set> --

Code:
	<!-- Update the Granary to have no effect on Deer sources -->
	
	<BuildingResourceChanges>
	
		<Update>
	
			<Where Type="BUILDING_GRANARY">
			
				<Where ResourceType="RESOURCE_DEER">
					<Set Yield="0" />
				</Where>
				
			</Where>
			
		</Update>
		
	</BuildingResourceChanges>

I have no idea where the missing <set> goes; could someone please fill me in? Many thanks!
 
It seems nested <Where> tags are not allowed. Also, the table name is Building_ResourceYieldChanges, not BuildingResourceChanges, and the column with building name is called "BuildingType", not "Type". So it should be:

Code:
	<Building_ResourceYieldChanges>
		<Update>
			<Where BuildingType="BUILDING_GRANARY" ResourceType="RESOURCE_DEER"/>
			<Set Yield="0"/>
		</Update>
	</Building_ResourceYieldChanges>
 
It seems nested <Where> tags are not allowed. Also, the table name is Building_ResourceYieldChanges, not BuildingResourceChanges, and the column with building name is called "BuildingType", not "Type". So it should be:

Code:
	<Building_ResourceYieldChanges>
		<Update>
			<Where BuildingType="BUILDING_GRANARY" ResourceType="RESOURCE_DEER"/>
			<Set Yield="0"/>
		</Update>
	</Building_ResourceYieldChanges>

Many thanks--I didn't know about the rule against nested <where> tags, but couldn't think of another way to check two values at the same time. I'm glad you were able to teach me! The incorrect table names, I confess, were just mental slips. :blush:
 
Back
Top Bottom