Passing full commands to Lua from C++
Posted: Tue Mar 27, 2012 10:45 am
Hey guys--
I'm working on a game in C++ that is using Lua for it's scripting language, and I'm using Luabind.
I was just wondering, if there's a command in Lua or Luabind where I could essentially just pass Lua a string of anything and have it return a value. I don't want to have to specify in C++ what the parameters or how many of them there are, I just want to pass an entire string and have Lua handle it.
For example, I might want to output a table's value
print( character["Bob"]["name"] )
Or call an existing Lua function
room_GetNeighbors()
etc. etc., for debugging purposes.
Thanks for any help.
-Rach
I'm working on a game in C++ that is using Lua for it's scripting language, and I'm using Luabind.
I was just wondering, if there's a command in Lua or Luabind where I could essentially just pass Lua a string of anything and have it return a value. I don't want to have to specify in C++ what the parameters or how many of them there are, I just want to pass an entire string and have Lua handle it.
For example, I might want to output a table's value
print( character["Bob"]["name"] )
Or call an existing Lua function
room_GetNeighbors()
etc. etc., for debugging purposes.
Thanks for any help.
-Rach