All pastes #423431 Raw Edit

Something

public cpp v1 · immutable
·published 2007-04-04 04:33 UTC
rendered paste body
int procdostring(lua_State* Q){	lua* L = new lua(Q);	lua* G = new lua();	const char* str = L->getstring(-1);	G->dostring(str);	G->getglobal("magic");	G->push(str);	G->pcall(1,1);	if (G->isnumber(-1) == true)	{		L->push(G->getnumber(-1));		G->pop(1);		return 1;	}else {		if (G->isbool(-1))		{			L->push(G->getboolean(-1));			G->pop(1);			return 1;		}		return 0; //Error	}}