Jump to content
  • Advertisement
Sign in to follow this  

luabind and modules

This topic is 4111 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello I have a user-customizable map which looks like that: std::map<std::string, std::vector<std::string>> mapkey1 -> value1 value2 value3 etc.. mapkey2 -> value.. Now I want to add c++ functions to luabind in a loop.. Is that possible? For instance: luabind::module(state) [ //here I'd like to make some kind of loop that would add mapkey1 function that would call somefunction("mapkey1); .. ]; In case that is not possible, is there any way to define globals in lua so that some function is called instead of passing a global? For instance: luabind::globals(state)["mapkey1"] = call_some_function_and_return(); Thanks for help Best regards

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!