lua-users home
lua-l archive

Re: C++ internal class structs in toLua++

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> How can I use the enum values in a lua script? I’ve tried something like
>
>
> x = Channel:ChannelDirection:INVERSE
>
>
> but I get the following error: “function arguments expected near ':'”
The error message should be a clue: The : operator is used for member
function calls. Use the . operator to access member variables. (I'm
using C++-speak for your sake; they're not called "member functions"
or "member variables" in Lua but I know you'll understand me.)
/s/ Adam

AltStyle によって変換されたページ (->オリジナル) /