Jump to content

Delenda_est error!


gameboy
 Share

Recommended Posts

@wowgetoffyourcellphone

I tested the latest https://github.com/justusavramenko/delenda_est, and I found these errors in the game. I played a single-player game.

My operating system is Win1064. 8G RAM.

ERROR: JavaScript error: globalscripts/sprintf.js line 66 Error: [sprintf] property 'hotkey' does not exist sprintf.format@globalscripts/sprintf.js:66:1 sprintf@globalscripts/sprintf.js:50:16 getRepairTimeTooltip@gui/common/tooltips.js:399:3 displaySingle@gui/session/selection_details.js:257:34 updateSelectionDetails@gui/session/selection_details.js:463:3 updateGUIObjects@gui/session/session.js:967:2 onSimulationUpdate@gui/session/session.js:897:2 __eventhandler165 (simulationupdate)@session simulationupdate:0:1
ERROR: JavaScript error: globalscripts/sprintf.js line 66 Error: [sprintf] property 'hotkey' does not exist sprintf.format@globalscripts/sprintf.js:66:1 sprintf@globalscripts/sprintf.js:50:16 getRepairTimeTooltip@gui/common/tooltips.js:399:3 displaySingle@gui/session/selection_details.js:257:34 updateSelectionDetails@gui/session/selection_details.js:463:3 updateGUIObjects@gui/session/session.js:967:2 onSimulationUpdate@gui/session/session.js:897:2 __eventhandler165 (simulationupdate)@session simulationupdate:0:1
ERROR: JavaScript error: gui/summary/layout.js line 252 TypeError: headerGUI is undefined updateGeneralPanelHeadings@gui/summary/layout.js:252:3 updatePanelData@gui/summary/summary.js:376:2 selectPanel@gui/summary/summary.js:212:3 __eventhandler351 (press)@resourcesPanelButton press:0:1
ERROR: JavaScript error: gui/summary/layout.js line 252 TypeError: headerGUI is undefined updateGeneralPanelHeadings@gui/summary/layout.js:252:3 updatePanelData@gui/summary/summary.js:376:2 selectPanel@gui/summary/summary.js:212:3 __eventhandler351 (press)@resourcesPanelButton press:0:1
ERROR: CXeromyces: Parse error: gui/pregame/userreport/userreport.xml:8: StartTag: invalid element name
ERROR: CXeromyces: Parse error: gui/pregame/userreport/userreport.xml:8: StartTag: invalid element name
ERROR: CXeromyces: Parse error: gui/pregame/userreport/userreport.xml:8: StartTag: invalid element name
ERROR: CXeromyces: Parse error: gui/pregame/userreport/userreport.xml:8: StartTag: invalid element name
ERROR: CXeromyces: Parse error: gui/pregame/userreport/userreport.xml:8: StartTag: invalid element name
ERROR: CXeromyces: Parse error: gui/pregame/userreport/userreport.xml:8: StartTag: invalid element name
ERROR: CXeromyces: Parse error: gui/pregame/userreport/userreport.xml:8: StartTag: invalid element name
ERROR: CXeromyces: Parse error: gui/pregame/userreport/userreport.xml:9: attributes construct error
ERROR: CXeromyces: Parse error: gui/pregame/userreport/userreport.xml:9: Couldn't find end of Start Tag object line 9

 

Link to comment
Share on other sites

  • 1 year later...

Hi I am getting the same error when I try to edit the schema in a Component File. I'm trying to make a "Renewable" resource that regenerates slowly, and that doesn't become exhausted after it is used up.

I used the ResourceSupply component from Borgs mod to get the "Change" and "Fattening" which makes berries slowly regrow. Then I edited the berry template. The "Renewable" part under "ResourceSupply" is from the Component file which schema I edited.
 

<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_gaia_flora_bush">
  <Identity>
    <Tooltip>Pick fruit for food.</Tooltip>
  </Identity>
  <Minimap>
    <Type>food</Type>
    <Color r="155" g="204" b="102"/>
  </Minimap>
  <Obstruction>
    <Static width="4.0" depth="4.0"/>
    <BlockMovement>false</BlockMovement>
    <BlockPathfinding>false</BlockPathfinding>
  </Obstruction>
  <ResourceSupply>
    <MaxAmount>200</MaxAmount>
    <Amount>200</Amount>
    <Type>food.fruit</Type>
    <Change>
      <Fattening>
        <Value>1</Value>
        <Interval>4000</Interval>
      </Fattening>
    </Change>
    <Renewable>true</Renewable>
  </ResourceSupply>
  <Sound>
    <SoundGroups>
      <select>interface/select/resource/sel_fruit.xml</select>
    </SoundGroups>
  </Sound>
</Entity>

The Schema in the Component File is like this(the Change part is from Borgs mod, the Renewable from my own):

 

ResourceSupply.prototype.Schema =
	"<a:help>Provides a supply of one particular type of resource.</a:help>" +
	"<a:example>" +
		"<Amount>1000</Amount>" +
		"<MaxAmount>1500</MaxAmount>" +
		"<Type>food.meat</Type>" +
		"<KillBeforeGather>false</KillBeforeGather>" +
		"<MaxGatherers>25</MaxGatherers>" +
		"<DiminishingReturns>0.8</DiminishingReturns>" +
		"<Change>" +
			"<Growth>" +
				"<Constraint>Alive</Constraint>" +
				"<Value>2</Value>" +
				"<Interval>1000</Interval>" +
			"</Growth>" +
			"<Decay>" +
				"<Constraint>Dead</Constraint>" +
				"<Value>-1</Value>" +
				"<Interval>1000</Interval>" +
				"<Delay>2000</Delay>" +
			"</Decay>" +
		"</Change>" +
        "<Renewable>false</Renewable>"+
	"</a:example>" +
	"<element name='KillBeforeGather' a:help='Whether this entity must be killed (health reduced to 0) before its resources can be gathered'>" +
		"<data type='boolean'/>" +
	"</element>" +
	"<element name='Amount' a:help='Amount of resources available from this entity'>" +
		"<choice><data type='nonNegativeInteger'/><value>Infinity</value></choice>" +
	"</element>" +
	"<optional>" +
		"<element name='MaxAmount' a:help='The max amount of resource the entity can reach when growing'>" +
			"<ref name='nonNegativeDecimal'/>" +
		"</element>" +
	"</optional>" +
    "<optional>" +
        "<element name='Renewable' a:help='Whether this resource is to be left alone(entity not removed) after it's resource supply is used up'>" +
            "<data type='boolean' />" +
        "</element>" +
    "</optional>" +
	"<element name='Type' a:help='Type and Subtype of resource available from this entity'>" +
		Resources.BuildChoicesSchema(true, true) +
	"</element>" +
	"<element name='MaxGatherers' a:help='Amount of gatherers who can gather resources from this entity at the same time'>" +
		"<data type='nonNegativeInteger'/>" +
	"</element>" +
	"<optional>" +
		"<element name='DiminishingReturns' a:help='The relative rate of any new gatherer compared to the previous one (geometric sequence). Leave the element out for no diminishing returns.'>" +
			"<ref name='positiveDecimal'/>" +
		"</element>" +
	"</optional>" +
	"<optional>" +
		"<element name='Change' a:help='Optional element for defining whether a resource supply would regenerate when it&quot;s not gathered'>" +
			"<zeroOrMore>" +
				"<element a:help='Optional element for defining whether a resource supply would regenerate when it&quot;s not gathered'>" +
					"<anyName />" +
					"<interleave>" +
						"<optional>" +
							"<element name='Constraint' a:help='Specifies the terrain type restriction for this building.'>" +
								"<choice>" +
									"<value>Alive</value>" +
									"<value>Dead</value>" +
									"<value>Both</value>" +
								"</choice>" +
							"</element>" +
						"</optional>" +
						"<optional>" +
							"<element name='Delay' a:help='Delay in milliseconds before the object starts growing or decaying'>" +
								"<ref name='nonNegativeDecimal'/>" +
							"</element>" +
						"</optional>" +
						"<element name='Value' a:help='The amount of resource added per interval'>" +
							"<data type='decimal'/>" +
						"</element>" +
						"<element name='Interval' a:help='The interval in milliseconds'>" +
							"<data type='nonNegativeInteger'/>" +
						"</element>" +
					"</interleave>" +
				"</element>" +
			"</zeroOrMore>" +
		"</element>" +
	"</optional>";

The other JS Code is, for now, just

 

ResourceSupply.prototype.GetRenewable = function()
{
    return this.Renewable == "true";
};

I think the logic which actually uses this function is irrelevant, because when I don't call this function at all I still get the "attributes construct error".

 

ERROR: CXeromyces: Parse error: (null):9: attributes construct error
ERROR: CXeromyces: Parse error: (null):9: Couldn't find end of Start Tag element line 9
ERROR: CXeromyces: Parse error: (null):9: Opening and ending tag mismatch: optional line 9 and element
ERROR: CXeromyces: Parse error: (null):9: Opening and ending tag mismatch: interleave line 9 and optional
ERROR: CXeromyces: Parse error: (null):9: Opening and ending tag mismatch: element line 9 and interleave
ERROR: CXeromyces: Parse error: (null):9: Opening and ending tag mismatch: define line 9 and element
ERROR: CXeromyces: Parse error: (null):9: Opening and ending tag mismatch: grammar line 1 and define
ERROR: CXeromyces: Parse error: (null):9: Extra content at the end of the document
ERROR: CXeromyces: Parse error: (null):0: xmlRelaxNGParse: could not parse schemas
ERROR: RelaxNGValidator: Failed to compile schema

I'm using version 23. I don't understand the logic of when to use <interleave> and <ref name='x'> vs <data type='x'>

Edited by myou5e
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...