| 247 | } |
| 248 | |
| 249 | void ofxLua::scriptUpdate() { |
| 250 | if(L == NULL || !isFunction("update")) { |
| 251 | return; |
| 252 | } |
| 253 | lua_getglobal(L, "update"); |
| 254 | if(lua_pcall(L, 0, 0, 0) != 0) { |
| 255 | std::string msg = "Error running update(): " |
| 256 | + (std::string) lua_tostring(L, LUA_STACK_TOP); |
| 257 | errorOccurred(msg); |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | void ofxLua::scriptDraw() { |
| 262 | if(L == NULL || !isFunction("draw")) { |
no test coverage detected