Hello All,
I am using MP70 gateway in my project. Applications are built using Lua scripting.
There is some problem with the “string.unpack()” function.
I have a sample program,
local myStr = string.char(0x31)
myStr = myStr … string.char(0x32)
myStr = myStr … string.char(0x33)
myStr = myStr … string.char(0x34)
print(string.unpack(“I4”,myStr))
I expect the following output,
875770417 5
(The above output is seen in the online lua interpreter)
But the MP70 throws an error as follows,
/bin/lua: main.lua:29: bad argument #1 to ‘unpack’ (bad code `1’)
stack traceback:
[C]: in function ‘unpack’
main.lua:29: in function ‘main’
main.lua:48: in main chunk
[C]: ?
Could anyone please help me out to resolve this issue?