--------------------------------------------------------------------
| 235 | |
| 236 | //-------------------------------------------------------------------- |
| 237 | void ofxLua::scriptSetup() { |
| 238 | if(L == NULL || !isFunction("setup")) { |
| 239 | return; |
| 240 | } |
| 241 | lua_getglobal(L, "setup"); |
| 242 | if(lua_pcall(L, 0, 0, 0) != 0) { |
| 243 | std::string msg = "Error running setup(): " |
| 244 | + (std::string) lua_tostring(L, LUA_STACK_TOP); |
| 245 | errorOccurred(msg); |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | void ofxLua::scriptUpdate() { |
| 250 | if(L == NULL || !isFunction("update")) { |
no test coverage detected