Sign in to follow this  
Followers 0
Shadowram

Question: Can the contents of a variable be used to declare another?

3 posts in this topic

I'm trying to make a function that will declare a new variable for me based on data I pass to it via another variable.

Example:

Func Cast($spell,$cooldown)

If $spell = "FixCar" I want to somehow have the function create a variable called $FixCar, without mentioning "FixCar" anywhere but Cast("FixCar",2600). The reason for this, is I want the Cast Function to be able to track cooldowns based on the string contained in $spell.

Is this possible? I apologize in advance if this is a simple question, or the answer is somewhere else. I can't find it / figure it out. Thanks in advance for any help.

Share this post


Link to post
Share on other sites



The function is Assign.

Thank you!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0