// call lua with a string to execute:
char buffer[128];
snprintf(buffer,128,"if drawdot then drawdot( %f, %f ) end", xcoord, ycoord);
luacall::lualoadstring(buffer);
// get the value from a double var:
printf("Get Double %f\n",luacall::luagetdoublevar("testdouble"));
//some indirection: get a double var from the name stored in the variable named by teststring2
printf("Testing luagetstring: value for %s %f\n",
luacall::luagetstringvar("teststring2").c_str(),
luacall::luagetdoublevar(luacall::luagetstringvar(luacall::luagetstringvar("teststring2").c_str()).c_str()));
// get the value from a integer var:
printf("Get Int %d\n",luacall::luagetdoublevar("testint"));