TripleA Logo TripleA Forum
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags
    • Register
    • Login

    xml error "attachment" must match "(option)+"

    Scheduled Pinned Locked Moved Map Making
    11 Posts 3 Posters 2.6k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B Offline
      beelee
      last edited by beelee

      not sure what this means. Things were going pretty good so I didn't test for a while and it'll take a lot of time to track down. Here's the error:

      0_1518219438483_Screenshot from 2018-02-09 17-37-01.png

      Here's the xml line in question ( the cursor is 9953 😞

      "0_1518219354976_Screenshot from 2018-02-09 17-35-27.png "

      Any help is appreciated.
      Thanks

      I should add that it throws it when I start triplea but when I fire up the game it doesn't prevent it from running.

      1 Reply Last reply Reply Quote 0
      • General_ZodG Offline
        General_Zod Moderators
        last edited by

        SAXParseException have been tricky for me in past. Some actually led me on wild goose chases that I could only resolve by reverting to an older version of files. Led me to believe some files became corrupted.

        Anyways that being said, try searching the xml for "(option)+". It seems to be referring to that specifically.

        B 1 Reply Last reply Reply Quote 0
        • B Offline
          beelee @General_Zod
          last edited by

          @general_zod Thank you. Yea searched on the web and got a bunch of irs and amazon things. Anyway I'll give it a shot.
          I should no better by now not to get in a hurry and test every change : )

          redrumR 1 Reply Last reply Reply Quote 0
          • redrumR Offline
            redrum Admin @beelee
            last edited by

            @beelee The error indicates that the "attachment" block must only have "option" elements inside it. I don't see any obvious error. Can you post the entire XML?

            TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

            B 1 Reply Last reply Reply Quote 0
            • B Offline
              beelee @redrum
              last edited by

              @redrum Thanks redrum. I'm thinking I changed some stuff with the "conditionAttachmentConvoyAndBlockade" gonna check now. Here's xml:

              0_1518230839630_Global_40_House_Rules_Canada.xml

              @General_Zod yea didn't find "(option+)" Think I jacked something up in either a trigger or that condition

              redrumR 1 Reply Last reply Reply Quote 0
              • redrumR Offline
                redrum Admin @beelee
                last edited by

                @beelee This appears to be the problem:

                    <attachment name="triggerAttachment_Militia_For_All" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                      <option name="trigger" value="conditionAttachmentMilitia_For_All"/>
                      <option name="productionRule" value="productionGermans:buyMilitia"/>
                      <option name="productionRule" value="productionRussians:buyRussian_Militia"/>
                      <option name="productionRule" value="productionJapanese:buyJapanese_Militia"/>
                      <option name="productionRule" value="productionAmericans:buyMilitia"/>
                      <option name="productionRule" value="productionBritish:buyMilitia"/>
                      <option name="productionRule" value="productionUK_Pacific:buyMilitia"/>
                      <option name="productionRule" value="productionItalians:buyMilitia"/>
                      uyDestroyerC5"/>
                      <option name="productionRule" value="productionFrench:-buyDestroyer"/>
                      <option name="productionRule" value="productionFrench:buyDestroyerC5"/>
                      <option name="when" value="before:germansPurchase"/>
                      <option name="uses" value="1"/>
                    </attachment>
                

                You have some random text in that attachment.

                Here is a fixed version: 0_1518231353705_global_40_house_rules_canada_FIXED.xml

                TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                B 1 Reply Last reply Reply Quote 2
                • B Offline
                  beelee @redrum
                  last edited by

                  @redrum Right on ! How did you track that if it's not to lengthy to explain ?

                  Thanks for your time 🙂

                  redrumR 1 Reply Last reply Reply Quote 0
                  • redrumR Offline
                    redrum Admin @beelee
                    last edited by

                    @beelee Opened the XML and scrolled down to about the line you got the error on. I think you're text editor must mark the lines differently (maybe counts wrapped lines as 2). I use Notepad++.

                    TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                    B 1 Reply Last reply Reply Quote 0
                    • B Offline
                      beelee @redrum
                      last edited by

                      @redrum right on. I need to learn notepad. on emacs. So look in the neighborhood anyway. Cool thanks again. Saved hours of time 🙂 Heppster Rock Image 🙂

                      1 Reply Last reply Reply Quote 0
                      • General_ZodG Offline
                        General_Zod Moderators
                        last edited by

                        Yep notepad++ is the best way to go. This (option)+ is misleading too. Would be nice if it could list the unrecognized text instead. But I guess that's a moot point since the line numbers were in fact correct if in notepad++

                        redrumR 1 Reply Last reply Reply Quote 1
                        • redrumR Offline
                          redrum Admin @General_Zod
                          last edited by

                          @general_zod (option)+ stands for the XML constraint that is being broken. It essentially says that you can only have "1 or more option elements inside attachment". Which pretty much means you either have some other invalid element like in this case or misspelled one of them.

                          TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                          1 Reply Last reply Reply Quote 2

                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                          With your input, this post could be even better 💗

                          Register Login
                          • 1 / 1
                          • First post
                            Last post
                          Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums