[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: error loading chunk
- From: "Victor Bombi" <sonoro@...>
- Date: Mon, 12 May 2014 20:40:54 +0200
Hello,
In Lua5.1.5 I use luaL_loadstring to load a string with some code into a new
lua_State.
I thought that it would be nicer to write it as a function and then use
string.dump to provide the chunk
the result is
testgenerator.lua:42: error loading chunk: binary string: unexpected end in
precompiled chunk
in a simple test (chunk is a string with lua code, dac:setCallback is the C
function using luaL_loadstring)
dac:setCallback(chunk)
works
dac:setCallback(string.dump(loadstring(chunk)))
throws the same error as above
How this could be?
victor
---
Este mensaje no contiene virus ni malware porque la protección de avast! Antivirus está activa.
http://www.avast.com