MCPcopy Create free account
hub / github.com/danomatika/ofxLua / scriptSetup

Method scriptSetup

src/ofxLua.cpp:237–247  ·  view source on GitHub ↗

--------------------------------------------------------------------

Source from the content-addressed store, hash-verified

235
236//--------------------------------------------------------------------
237void 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
249void ofxLua::scriptUpdate() {
250 if(L == NULL || !isFunction("update")) {

Callers 3

loadScriptMethod · 0.80
setupMethod · 0.80
loadScriptMethod · 0.80

Calls 1

lua_getglobalFunction · 0.85

Tested by

no test coverage detected