#(survivalpro) Strange behavior of MapTag

25 messages · Page 1 of 1 (latest)

jagged geyser
#

Strange behavior of MapTag when parameters are transferred into a task.
I found a problem in one of my codes and tried testing.

I hope someone can enlight me.

quaint snowBOT
#

(survivalpro) Strange behavior of MapTag

quaint snowBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

rustic elk
#

!info paste debug

dusky fiberBOT
#
Info: debug

If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!

jagged geyser
#

I dont know whether the order of definitions is important

brisk sonnet
#

I would generally avoid using the | syntax when passing arguments to tasks, especially with maps and lists

#

!c run

dusky fiberBOT
# brisk sonnet !c run
Group

queue

Syntax

run [<script>] (path:<name>) (def:<element>|.../defmap:<map>/def.<name>:<value>) (id:<name>) (speed:<value>/instantly) (delay:<value>)

Short Description

Runs a script in a new queue.

Description

Runs a script in a new queue.

You must specify a script object to run.

Optionally, use the "path:" argument to choose a specific sub-path within a script.

Optionally, use the "def:" argument to specify definition values to pass to the script,
the definitions will be named via the "definitions:" script key on the script being ran,
or numerically in order if that isn't specified (starting with <[1]>).

Alternately, use "defmap:<map>" to specify definitions to pass as a MapTag, where the keys wi...

brisk sonnet
#

Use either def.map:<[map]> def.element:<[element]> or use the defmap to pass a map with the arguments

fierce sparrow
#

def.map:<[map]>
it's just defmap w no dot, def.map would pass a map as a single definition

rustic elk
fierce sparrow
rustic elk
#

Oh yeah, if you want to use defmap you'll need to create a new map with both of these definitions in it

#

Or you can just directly specify them using def.name

jagged geyser
#

If I want to pass 2 variables without mapping or the usage of - run example def:def1|def2 as an example, do I have to define them like this? - run example def.name1:value1 def.name1:value2

fierce sparrow
jagged geyser
#

oh just a typo 😄

fierce sparrow
#

Eg for the script you posted, you'd do

- define map <map[Valueee=1;Value=2]>
- define element:5
- run my_task def.element:<[element]> def.map:<[map]>```
jagged geyser
#

Thanks for the help !