37 tolua_Error tolua_err;
39 !tolua_isstring(tolua_S,1,0,&tolua_err) ||
40 !tolua_isnoobj(tolua_S,2,&tolua_err)
46 lua_State* L = tolua_S;
47 const char*
message = ((
const char*) tolua_tostring(tolua_S,1,0));
55 tolua_error(tolua_S,
"#ferror in function 'base'.",&tolua_err);
65 tolua_module(tolua_S,NULL,0);
66 tolua_beginmodule(tolua_S,NULL);
67 tolua_module(tolua_S,
"chat",0);
68 tolua_beginmodule(tolua_S,
"chat");
70 tolua_endmodule(tolua_S);
73 static unsigned char B[] = {
74 10,102,117,110, 99,116,105,111,110, 32, 99,104, 97,116, 46,
75 109,115,103, 40,102,109,116, 44, 32, 46, 46, 46, 41, 10, 99,
76 104, 97,116, 46, 98, 97,115,101, 40,115,116,114,105,110,103,
77 46,102,111,114,109, 97,116, 40,102,109,116, 44, 32, 46, 46,
78 46, 41, 41, 10,101,110,100,32
80 if (luaL_loadbuffer(tolua_S,(
char*)B,
sizeof(B),
"tolua: embedded Lua code") == LUA_OK)
81 lua_pcall(tolua_S,0,LUA_MULTRET,0);
84 tolua_endmodule(tolua_S);