How to store a value type in a userdata?
This SO article is the same thing, but the answer is unhelpful because the answer was in Lua and the question was about the C-API. So I'm asking again. Hopefully, others will benefit from this question. I'm actually having 2 problems (I can't get y an z to work, and I can't get helloworld() to work) I'm trying to get to this: local x = MyCBoundLib.GetSomething() print(x.y) print(x.z) Where x is a userdata. I keep getting attempt to index a userdata value I know that " userdata isn't indexable without a metatable because it's C/C++ data " In my C-code, I do something like this to try and wrap