Notifications
Clear all

[Closed] Variable string in Function Command

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

what about SetProperty function?

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

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)

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.