| 259 | } |
| 260 | |
| 261 | void ofxLua::scriptDraw() { |
| 262 | if(L == NULL || !isFunction("draw")) { |
| 263 | return; |
| 264 | } |
| 265 | lua_getglobal(L, "draw"); |
| 266 | if(lua_pcall(L, 0, 0, 0) != 0) { |
| 267 | std::string msg = "Error running draw(): " |
| 268 | + (std::string) lua_tostring(L, LUA_STACK_TOP); |
| 269 | errorOccurred(msg); |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | void ofxLua::scriptExit() { |
| 274 | if(L == NULL || !isFunction("exit")) { |
no test coverage detected