Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Maps do not work

    Scheduled Pinned Locked Moved Support
    otterbuildmaster
    2 Posts 1 Posters 18 Views
    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.
    • ? This user is from outside of this forum
      Guest
      last edited by

      Example 1:

           set @CustomerData = @(%(customer: "msk", Site: "evalueringmskdk", Artifact: "MskProduction"), %(customer: "cok", Site: "evalueringcokdk", Artifact: "CokProduction"));
           set %cdata = @CustomerData[0];
      

      This line causes a System.FormatException: Invalid use of vector expression in string.

      Example 2:

           set %SiteMap = %(msk: 1);
           set $itemX = $MapItem(%SiteMap, msk); 
      

      This line causes an Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object.

      Example 3:

           set %SiteMap = %(mix: "bix");
           set %SiteMap = $MapAdd(%SiteMap, msk, "eval");
      

      This line causes a System.ArgumentNullException: Value cannot be null. Parameter name: dictionary

      Example 4:

          set %SiteMap = %(mix: "bix");
          foreach $mapKey in @MapKeys(%SiteMap) 
          {
              Log-Debug key $mapKey;
          }
      

      The foreach causes Null Reference Exception when also when using "set %SiteMap = %();"

      Example 5:

          set %SiteMap = %(msk: 1);
          Log-Debug %SiteMap.msk;
          set $Customer = msk
          Log-Debug %SiteMap[$Customer];
          Log-Debug %SiteMap[$Customer];
      

      All Log-Debug statement causes an Unhandled exception: System.ArgumentException: Only scalar values can be part of a compound value

      Product: BuildMaster
      Version: 5.5.3

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        There are some bugs using map variables within OtterScript in v5.5.3; these have since been resolved.

        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
        Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation