I’m running Twine 2.5.1 with Sugarcube 2.36.1
This is part of an ongoing project transfer from Harlowe to sugarcube (to which I am a novice)
I have a number of variable arrays holding datamaps with multiple entries in Harlowe like so:
(set:$drawStatus to 0)
(set:$draw to
(a:
(dm:“name”,“draw 1”,“field1”,2,“field2”,6,“field3”,3,“field4”, 2,“type”,“enc”),
(dm:“name”,“draw 2”,“field1”,2,“field2”,6,“field3”,3,“field4”, 2,“type”,“enc”),
(dm:“name”,“draw 3”,“field1”,2,“field2”,6,“field3”,3,“field4”, 2,“type”,“enc”),
(dm:“name”,“draw 4”,“field1”,2,“field2”,6,“field3”,3,“field4”, 2,“type”,“enc”)
)
)
and it all works fine - but I’ve no clue how to emulate this in Sugarcube which seems to suggest (in the Harlowe to sugarcube manual) something like this:
<<set $array to [ ]>>
<<set $map to new Map([[“name”, “value”]])>>
but this doesn’t work as the [[ ]] instantly change into passage links so I’m lost.
is it something to do with
<<set $dm to {“name” : value, “name” : value }>>
???