31.10.2023, 07:57
Remove the for loop and try this:
Code:
if devices and devices.result then
device = devices.result[1]
device2 = devices.result[2]
device3 = devices.result[3]
...
end