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

    Error with Trigger Attachment

    Scheduled Pinned Locked Moved Map Making
    trigger
    9 Posts 3 Posters 886 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.
    • RogerCooperR Offline
      RogerCooper
      last edited by

      I am getting an error with the following attachments.

          <attachment name="conditionAttachmentTurn1" attachTo="British" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
            <option name="rounds" value="1"/>
          </attachment>
          
          <attachment name="triggerAttachmentTest" attachTo="British" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
            <option name="conditions" value="conditionAttachmentTurn1"/>
            <option name="placement" value="Celtic Sea Zone:Battleship"/>
            <option name="when" value="before:germanPurchase"/>
          </attachment>
      

      I receive the error "Unexpected Exception while setting values for attachment: TriggerAttachment attached to: Player Id named: British with name:triggerAttachmentTest.

      What I am doing wrong

      C 1 Reply Last reply Reply Quote 0
      • C Offline
        Cernel Moderators @RogerCooper
        last edited by

        @RogerCooper I might be overlooking something, but looks all good to me. Assuming the zone and unit names are correct, maybe see if you have another trigger called "triggerAttachmentTest" in that xml.

        RogerCooperR 1 Reply Last reply Reply Quote 0
        • LaFayetteL Offline
          LaFayette Admin
          last edited by

          @RogerCooper

          Which version of the game are you using? 1.9 or 2.0

          Could you attach a full XML zipped attachment for us to look at?

          Are you getting more information in the console window or an option to report the error if 2.0?

          RogerCooperR 1 Reply Last reply Reply Quote 0
          • RogerCooperR Offline
            RogerCooper @Cernel
            last edited by

            @Cernel It should have been

                <attachment name="triggerAttachmentTest" attachTo="British" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                  <option name="conditions" value="conditionAttachmentTurn1"/>
                  <option name="placement" value="Celtic Sea Sea Zone:battleship"/>
                  <option name="when" value="before:germanPurchase"/>
                </attachment>
            
            

            There is no error message, but it still does not fire. Is there a way of testing whether conditionAttachment is being met or a trigger firing?

            C 1 Reply Last reply Reply Quote 0
            • RogerCooperR Offline
              RogerCooper @LaFayette
              last edited by

              @LaFayette I fixed the syntax error but it is still not firing. I am using 2.0 and no error is appearing in the console window.

              1 Reply Last reply Reply Quote 0
              • LaFayetteL Offline
                LaFayette Admin
                last edited by

                Will probably need a zipped copy of the map to dig into this.

                1 Reply Last reply Reply Quote 0
                • C Offline
                  Cernel Moderators @RogerCooper
                  last edited by Cernel

                  @RogerCooper said in Error with Trigger Attachment:

                  @Cernel It should have been

                      <attachment name="triggerAttachmentTest" attachTo="British" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                        <option name="conditions" value="conditionAttachmentTurn1"/>
                        <option name="placement" value="Celtic Sea Sea Zone:battleship"/>
                        <option name="when" value="before:germanPurchase"/>
                      </attachment>
                  
                  

                  There is no error message, but it still does not fire. Is there a way of testing whether conditionAttachment is being met or a trigger firing?

                  Either:

                  • You have another condition called "conditionAttachmentTurn1".
                  • You have another trigger called "triggerAttachmentTest".
                  • The "when" is not referring to the phase you are looking at (the "when" is not validated, so it might even be an inexistent phase).
                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    Cernel Moderators
                    last edited by

                    Of course, still as long as the zone and unit names are correct. Are you sure that "Celtic Sea Sea Zone" is not, maybe, "Celtic Sea Zone"? However, if there are any issues in any of them and you are not getting errors, I guess that's a problem too.

                    RogerCooperR 1 Reply Last reply Reply Quote -1
                    • RogerCooperR Offline
                      RogerCooper @Cernel
                      last edited by

                      @Cernel Of course the issue was that I forget to set "Use Triggers" to true.

                      1 Reply Last reply Reply Quote 0

                      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