I wrote simple button function:
and here's the error:
Code:
function buySet()
local message = table.serialize({currentOutfit,outfit.addons})
print("sent: ".. message) -- works great
ProtocolGame.sendExtendedOpcode(0x4,message) -- just 4 doesn't work too
destroy()
end
wtf? in source there are uint8_t and string, there's no unsigned charsent: {[1] = 1, [2] = 2}
ERROR: protected lua call failed: LUA ERROR:
C++ call failed: LUA ERROR: attempt to cast a 'string' lua value to 'unsigned char'
stack traceback:
[C]: ?
[C]: in function 'sendExtendedOpcode'
/opTest/opTest.lua:30: in function 'buySet'
...opTest/opTest.otui:23: [@onClick]:2: in function <...alOutfitShop/opTest.otui:23: [@onClick]:1>
stack traceback:
[C]: ?
[C]: in function 'sendExtendedOpcode'
/opTest/opTest.lua:30: in function 'buySet'
...opTest/opTest.otui:23: [@onClick]:2: in function <...alOutfitShop/opTest.otui:23: [@onClick]:1>