I didn't / don't know how :(
The Lua / C++ interface stuff is one of my weak areas. I was quite pleased I got this much working! :D