All pastes #460771 Raw Edit

Something

public cpp v1 · immutable
#460771 ·published 2007-04-27 08:26 UTC
rendered paste body
void lua::dostring(const char* str){	int err = luaL_loadstring(L,str);	if (err == LUA_ERRSYNTAX) {		cout<<"Syntax Error in: ["<<str<<"] :"<<this->getError();		return;	}else if (err = LUA_ERRMEM) {		cout<<"Memory error?";		return;	}		//now we call the function	err = lua_pcall(L,0,0,0);	if (err == LUA_ERRRUN) {		cout<<"Runtime error in: ["<<str<<"] :"<<this->getError();		return;	}		if (err != 0) {		cout<<"Unknown error";	}}