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

    Error with maxConstructionsPerType

    Scheduled Pinned Locked Moved Map Making
    2 Posts 2 Posters 17 Views 2 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 receive the following error when loading the scenario

      GameParseException: Missing property definition for option ''maxConstructionsPerType'' in attachment ''unitAttachment''

      Here is my code

          <attachment name="unitAttachment" attachTo="fort" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
            <option name="defense" value="2"/>
            <option name="createsResourcesList" value="-1:PUs"/>
            <option name="hitPoints" value="2"/>
            <option name="isAAforCombatOnly" value="true"/>
            <option name="targetsAA" value="infantry:cavalry"/>
            <option name="maxRoundsAA" value="3"/>
            <option name="requiresUnits" value="infantry"/>
            <option name="isConstruction" value="true"/>
            <option name="constructionType" value="fort"/>
            <option name="constructionsPerTerrPerTypePerTurn" value="1"/>
            <option name="maxConstructionsPerType" value="5"/>
          </attachment>
      
      

      I want to limit the building of forts to 1 per turn, up to a max of 5 per territory.

      Is there something wrong with my code.

      wc_sumptonW 1 Reply Last reply Reply Quote 0
      • wc_sumptonW Online
        wc_sumpton @RogerCooper
        last edited by

        @RogerCooper

        I think the option you are looking for is "maxConstructionsPerTypePerTerr" as there no "maxConstructionsPerType".

        Cheers...

        1 Reply Last reply Reply Quote 1

        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
        Powered by NodeBB Forums