Ask A Question

View Question

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

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

Answer Question