Game Development Community

Using string to get variable value... [RESOLVED]

by MikeJ · in iTorque 2D · 06/01/2011 (6:38 pm) · 2 replies

I have a variable...

$row1X = 32;

I need to get the value based on a combination of strings and other variables...

"row" @ %id @ "X"
(row1X)

the result should be 32. I am referencing the variable using a string.

How is this possible?

#1
06/01/2011 (7:05 pm)
The function you're probably looking for is "getVariable".

%i = getVariable( "$row" @ %id @ "X";
#2
06/01/2011 (8:44 pm)
Thank you! That did it!