still working on the Client for OpenPeripheral's Glasses and ran into a problem again.
Every two seconds the system updates the screen and calls functions from the peripherals.
The code below is using the unpack(param) function because this method/function needs them.
There is an other version of the code without unpack(param) which doesnt cause any trouble.
local noErr,res = pcall( net.callRemote, unit, method, unpack(param))
if noErr then
number = tonumber(res)
else
number = "ERROR"
if not errorThrown then
drawText("ERROR!!! DRAWING NUMBER WITH ARGUMENTS! " .. res ,1,1,14)
errorThrown = true
end
end
Every two seconds the whole screen gets cleared and rewritten again (i know that is not efficent…).
All objects on the screen get drawn step by step and if the code above gets executed the program experiences a short interruption, which looks like THIS
The more methods the worse it gets.
Is it just the pcall which doesn't like a lot of arguments or is it the unpacking process of the parameter? (I usually just used 1 or 3 arguments)
Thanks for reading.
unobtanium