(02-15-2012, 07:14 AM)xoft Wrote:I don't get it, haha(02-15-2012, 07:10 AM)FakeTruth Wrote: That sounds like an aweful lot of work though, and it would probably be slow? If you want to do something to all entities on the server you request a list of entity ID's after which all function you call on them looks up the actual entity by ID and calls the function. This does not sound very efficient...That's not exactly what i meant. This interface would be used only if you wanted to do something with all the entities (or most of them at least); you could still use GetEntityByID() if you know the ID
(02-15-2012, 07:14 AM)xoft Wrote:I can get a value I expect from Lua in C++ (integer, string, etc.) and then call a Lua function from the C++ side and pass that value in one call. But I don't know how to do it with arbitrary values. I simply want to keep the values in the Lua stack without even reading it in C++ and pass it on to the next function. As you see it goes like this: Lua -> C++ -> Lua. I shouldn't need to access the arbitrary value in C++ and simply pass it on, but I don't know how...(02-15-2012, 07:10 AM)FakeTruth Wrote: I can't because I don't know how I know it's possible!That's a surprise for me, considering the Lua glue code you've written so far, i'd say that adding a single parameter to a function should be a piece of cake for you
EDIT: I just posted something on the Lua forums http://forum.luahub.com/index.php?topic=3472.0