Replace a variable name and run it within script

i have a large script with a lot of variables with the name #1 i cant find a good way to within a script auto replace the variable name and return an output. this was an attempt but for some reason it returned this

the way i want to do this is a multi dimensional map but i dont see anyone that made this

When calling a script that was made (or edited) using metaprogramming, you have to do this in order to make ot use the current script context (be able to get variables and use sprite blocks).

I have a deep map if that is of any use to you

untitled script pic - 2026-01-01T163622.187

i used it with the thing above the script result shows it didnt work

Mine works for me

ill try

Does work for what I need. I need every time where the variable input names appears in a script ex the #1 in set test to be set to a script. And I need every “#1“ in that script to be set to the name of the first input slot no matter how many input slots there are

To clarify. The first pic is what the block in the bottom Pic should report. Tho it should report it within its original wrapper with the input names

@ego-lay_atman-bay I cant think of any way to do this. Do you have any ideas

You may override variable in the expression, at the evaluation time, with the value of the ring parameter.

How does this help

You’ve got the desired output without rewriting the whole expression.

Or we have XY problem and you are trying to solve a tree traverse or static macro parametrization problem.

I dont need to solve it i just need the updated script

i gave an input and expected output

I think you may have missed @ego-lay_atman-bay’s solution. Here is it in practice in your script: