Author | Message | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Help binding lua to c++ with luabridge
| I was wondering if anyone on here has any experience binding lua to c++. I'm using a library named luabridge at the moment to try and bind existing classes so they can be accessed from lua. For example, something like "world.ServerMsg("blah")" to display a server message. I need it to bind an existing class because making a new one and calling that wouldn't display the server message to the world being used. ;.; Please don't tell me adding lua to eoserv is dumb or pointless either. :l
|
Re: Help binding lua to c++ with luabridge
| Do you mean an existing object? I know this has nothing to do with luabridge. GameObject temp(20); temp.setMessage("I'm set in C++"); // Push a pointer to this GameObject to the Lua stack lua_pushlightuserdata(L, (void*)&temp); --- Remember when is not an organization nor a fucking group , it's simply an idea that we believe in and live for. The priority of Remember when should come before oxygen , as oxygen is cosmetic even life itself is cosmetic,that's why offer our worthless lives to The "Remember when"
|
Re: Help binding lua to c++ with luabridge
| Thanks, this looks like it could help. Although I ended up making functions to call on the existing classes functions. Now I just need to figure out how to make something similar to util foreach in lua and ill be done.
|
Re: Help binding lua to c++ with luabridge
| Could you tell me why you are even bothering with Lua?
|
Re: Help binding lua to c++ with luabridge
| It's small and presumeably easy to integrate if you have a good enough knowledge of c++, unlike me. ;.;
|
Re: Help binding lua to c++ with luabridge
| I assume you learned Lua from Roblox? My little brother plays and knows all about that shit. --- The good times are killing me.
| |