lua-users home
lua-l archive

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


I am pretty new to lua and I need my lua scripts to be able to access 
class variables and/or member functions.  I am working on Win2K and 
using VC++.

Here is a basic example:
---------------------------------------------------
class foo
{
public:
	foo(char* startName, int startCash);	
	int x;
	char* y;
	int getX();
	int setX();
};

I want to register foo::setX() so my script can easily change the 
data within the class.

or

I want to directly change variable "x" from a lua script
----------------------------------------------------

Can anyone help with this, please?