Beispiel #1
0
void doLua()
{
	LuaManager L;
	int s;
	char* err;
	cout << "Starting lua!" << endl;
	L.reg_func("afunc", my_function);
	s = L.load("scripts/test2.lua");
	err = const_cast<char*>(L.errors(s));
	if (err)
		cout << err << endl;
	else
		s = L.exec(0, 0);
		err = const_cast<char*>(L.errors(s));
		if (err)
			cout << err << endl;
	cout << "Completed doing lua!" << endl;
}