Hi all!
I only use CPLua for programming.
But I do not know yet how to convert a string to a variable name.
Could someone help me?

Question About Cplua 0.8
Started by
Hobart
, Mar 14 2007 12:23 PM
3 replies to this topic
#1
Posted 14 March 2007 - 12:23 PM
#2
Posted 14 March 2007 - 12:40 PM
wrong forum, moved
#3
Posted 14 March 2007 - 07:46 PM
Well there is no special command to do that in Lua (as there is one in Basic)...
But one possibility is :
But one possibility is :
abc = 9 varName = "abc" print( getfenv()[varName] ) -- prints 9I hope it will help

#4
Posted 16 March 2007 - 01:22 PM
Yes! It works!
Thank You much!
Thank You much!

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users