Multiple document element was detected and unknown parse failure

Started by Tims, March 10, 2019, 04:33:37 PM

Previous topic - Next topic

Tims

I need some help with this. It's my first true attempt at modding so please be patient with me. As rimworld isn't picking up the gun and i think this is why
Exception reading Standard_Issue_Rifles.xml as XML: System.Xml.XmlException: Multiple document element was detected.  Line 29, position 3.
  at Mono.Xml2.XmlTextReader.ReadStartTag () [0x00000] in <filename unknown>:0
  at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename unknown>:0
  at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename unknown>:0
  at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0
  at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0
  at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
  at System.Xml.XmlDocument.ReadNode (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
  at System.Xml.XmlDocument.Load (System.Xml.XmlReader xmlReader) [0x00000] in <filename unknown>:0
  at System.Xml.XmlDocument.LoadXml (System.String xml) [0x00000] in <filename unknown>:0
  at Verse.LoadableXmlAsset..ctor (System.String name, System.String fullFolderPath, System.String contents) [0x00000] in <filename unknown>:0
Verse.Log:Warning(String, Boolean)
Verse.LoadableXmlAsset:.ctor(String, String, String)
Verse.<XmlAssetsInModFolder>c__Iterator0:MoveNext()
Verse.<LoadDefs>c__Iterator0:MoveNext()
System.Collections.Generic.List`1:AddEnumerable(IEnumerable`1)
System.Collections.Generic.List`1:AddRange(IEnumerable`1)
Verse.LoadedModManager:LoadModXML()
Verse.LoadedModManager:LoadAllActiveMods()
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.Root:<Start>m__1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__1()

&
C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\WW2 Allies Pack\Defs\ThingDefs/Standard_Issue_Rifles.xml: unknown parse failure
Verse.Log:Error(String, Boolean)
Verse.LoadedModManager:CombineIntoUnifiedXML(List`1, Dictionary`2)
Verse.LoadedModManager:LoadAllActiveMods()
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.Root:<Start>m__1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__1()

Any help would be appreciated.


[attachment deleted due to age]

BukTaki

could you post the Standard_Issue_Rifles.xml
there is a problem at line 29

Tims

I did though here i'll post it again if it didn't go threw originally.

[attachment deleted due to age]

BukTaki


Tims

<?xml version="1.0" encoding="utf-8" ?>

  <!--================================= Projectiles ====================================-->


<ThingDef ParentName="BaseBullet">
<defName>Bullet_ProjectileName</defName>
<label>ProjectileName</label>

<graphicData>
<texPath>Things/Projectile/Bullet_small</texPath>\
<graphicClass>Graphic_Single</graphicClass>
</graphicData>

<projectile>
<damageDef>Bullet</damageDef>
<damageAmountBase>9</damageAmountBase>
<speed>65</speed>
</projectile>
</ThingDef>



  <!--================================= Weapons ====================================-->

  <!--================================= M1_Garand ====================================-->
 
 
<ThingDef ParentName="BaseBullet">
<defName>TIMS_M1G</defName>
    <label>M1_Garand</label>
    <description>The M1 Garand. A American classic devloped by A Canadian American, John Garand. It was one of the first standard issue semi automatic military rilfe that was put into service in 1936.</description>
    <graphicData>
      <texPath>Things/Item/Equipment/WeaponRanged/BoltActionRifle</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
    <soundInteract>Interact_Rifle</soundInteract>
    <statBases>
      <WorkToMake>12000</WorkToMake>
      <Mass>3.5</Mass>
      <AccuracyTouch>0.65</AccuracyTouch>
      <AccuracyShort>0.80</AccuracyShort>
      <AccuracyMedium>0.90</AccuracyMedium>
      <AccuracyLong>0.80</AccuracyLong>
      <RangedWeapon_Cooldown>1.5</RangedWeapon_Cooldown>
    </statBases>
    <costList>
      <Steel>60</Steel>
  <Wood>10</Wood>
      <ComponentIndustrial>2</ComponentIndustrial>
    </costList>
    <recipeMaker>
      <skillRequirements>
        <Crafting>5</Crafting>
      </skillRequirements>
    </recipeMaker>
    <verbs>
      <li>
        <verbClass>Verb_Shoot</verbClass>
        <hasStandardCommand>true</hasStandardCommand>
        <defaultProjectile>Bullet_ProjectileName</defaultProjectile>
        <warmupTime>1.0</warmupTime>
        <range>36.9</range>
        <soundCast>Shot_BoltActionRifle</soundCast>
        <soundCastTail>GunTail_Heavy</soundCastTail>
        <muzzleFlashScale>9</muzzleFlashScale>
      </li>
    </verbs>
    <tools>
      <li>
        <label>stock</label>
        <capacities>
          <li>Blunt</li>
        </capacities>
        <power>9</power>
        <cooldownTime>2</cooldownTime>
      </li>
      <li>
        <label>barrel</label>
        <capacities>
          <li>Blunt</li>
          <li>Poke</li>
        </capacities>
        <power>9</power>
        <cooldownTime>2</cooldownTime>
      </li>
    </tools>
  </ThingDef>
  <ThingDef ParentName="BaseBullet">
    <defName>Bullet_ProjectileName</defName>
    <label>30-06 bullet</label>
    <projectile>
      <damageDef>Bullet</damageDef>
      <damageAmountBase>18</damageAmountBase>
      <stoppingPower>1.5</stoppingPower>
      <speed>70</speed>
    </projectile>
    <graphicData>
      <texPath>Things/Projectile/Bullet_big</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
  </ThingDef>
  <!-- ================================= M1903 Springfield ==================================== -->
  <!-- ================================= Lee-Enfield Mark 3 ==================================== -->
  <!-- ================================= Lee-Enfield No. 4 ==================================== -->
  <!-- ================================= M1 Carbine ==================================== -->
  <!-- ================================= MAS 36 ==================================== -->
  <!-- ================================= MAS 44 ==================================== -->
  <!-- ================================= RSC ==================================== -->
</Defs>

BukTaki

i think your missing <Defs> at the beginning

<?xml version="1.0" encoding="utf-8" ?>
<Defs>

Tims