#can some1 help with this macro issue
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
💬 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
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
<@&1166082198152159386> <@&1202694677766348840>
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)
Honestly my guy this is kinda tough to follow
Yes
The only lines that matter I think r ones with next_index
I’m just super confused why it’s never printing the value 0
The storage im passing in is the mg_variables btw
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
if I make a smaller function that’s called just to set the macro would that work ?
Basically moving half the code imto a diff function that calls this function when it finishes
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
wait so u can’t do smth like setting the data to smth then setting it again in the same function ?
You can set the data again, but the macro argument won't change
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
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
Will it? Or will it print 12 after the first one?
From my understanding it should stay at 1 but I never ran it, so yeah, just an assumption - but running this could confirm it
Should it print 12 if u call another macro function AFTER that function that says it ??
Epic !!