Notifications
Clear all
[Closed] Variable string in Function Command
Aug 12, 2022 11:57 pm
I’m trying to make a function that changes the property as if it were a variable, the code below serves as an example. Is this possible? Well, that way it’s not working. What other way to use a perty as a variable?
fn thefunction var =
(
example.var
)
I’m trying too use execute command but not work.
That point between “example” and the var string make wrong syntax.
4 Replies
Aug 12, 2022 11:57 pm
if you’re asking if using this is in the other post’s script is correct, it’s to replace the “map” with a variable
fn examplefunction map =
setProperty d prop c.map
Aug 12, 2022 11:57 pm
c.Map is the same as GetProperty c #Map
so this part could be rewritten like this:
prop_name = #map
setProperty d prop (GetProperty c prop_name)
Aug 12, 2022 11:57 pm
it worked, it’s so simple, how had I not realized that one was equivalent to the other? hahaha, thanks and sorry for the stupid question, you are helping a lot.