[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Bin2c does nothing in my app?
- From: "Ashwin Hirschi" <deery@...>
- Date: Thu, 29 Mar 2007 05:35:34 +0200
>>> lua_State *L = lua_open();
>>> if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"mtx.luc")==0)
>>> lua_pcall(L, 0, 0, 0);
>>> lua_close(L);
>>>
>> [...]
>>
>>> I run the program but it gives no output.
>>>
>>
>> Add
>> else puts(lua_tostring(L,-1);
>> after the if and see what the error message says.
I expect that loading the chunk goes just fine.
But running it will be a different matter, esp. since you're not initializing any of the Lua libraries [i.e. no output functions are available to your Lua script!].
To confirm (or deny) this, you should try and catch [read: print] any error the pcall puts on the Lua stack.
Ashwin.
--
no signature is a signature.