#can some1 help with this macro issue

1 messages · Page 1 of 1 (latest)

cerulean mulch
#

a

thin torrentBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

cerulean mulch
#

this is entire program

#

im printing stuff to see whats wrong

#

i dont understand why the msg printed after start is not 0

#

is that not what i am doing the line before, setting it to 0?????

#

pls hlep

#

me want to do schoolwork

#

but wanna figure this out before

thin torrentBOT
# thin torrent <@&1201956957406109788>

<@&1166082198152159386> <@&1202694677766348840>

🙇 Helpers Arise!

Please note that you still might not immediately get a response since all helpers are human beings and volunteers (and also might be sleeping right now)

cerulean mulch
quiet nexus
#

Honestly my guy this is kinda tough to follow

cerulean mulch
#

Yes

cerulean mulch
#

I’m just super confused why it’s never printing the value 0

#

The storage im passing in is the mg_variables btw

woeful fractal
# cerulean mulch

macros must be in a separate function and cannot be changed in the current one. if you have changed the index, then you need to run a new function

cerulean mulch
#

Basically moving half the code imto a diff function that calls this function when it finishes

willow surge
#

Every time you change next_index, you will need to call a new macro function

#

Because once the data is passed to the macro, it can't change

cerulean mulch
willow surge
#

You can set the data again, but the macro argument won't change

cerulean mulch
#

Will it update for a function that runs after it ?

#

cause if it does I should have a fix in mind

#

I’ll do it when I’m off bus

silent kernel
#
data modify storage a:b c set value {d:1}
execute as @e run function a:macro with storage a:b c
$say $(d)
data modify storage a:b c.d set value 12
$say $(d)
say ————————-

Would still print

1
1
————————-
1
1
————————-
[…]
#

For all entities

#

Since the macro values get set when the function is called

willow surge
#

Will it? Or will it print 12 after the first one?

silent kernel
#

From my understanding it should stay at 1 but I never ran it, so yeah, just an assumption - but running this could confirm it

cerulean mulch
willow surge
#

Yes

#

If it's been modified since then

cerulean mulch
#

Epic !!