lua-users home
lua-l archive

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


G'day!

If I have something like:

MyStuff={};
MyStuff.Data="whatever";
function MyStuff.MyFunction()
  do stuff
end

I can call MyFunction from within the lua script without a problem as MyStuff.MyFunction(), but when I try it from C I get an error (nil value).

If I change the function to MyFunction (not within a table), then it works fine. I'm sure it's just a dumb newbie mistake, so I'd appreciate if someone can point out what I'm doing wrong.

Stay Casual,

Ken