17 posts
Location
East Coast United States
Posted 22 October 2016 - 03:01 AM
My advanced computer is starting after a server reboot but errors with attempt to index ? (a nil value) when it tries to access the monitors the first time. If I run startup from the command prompt it works fine.
It's a basic billboard program using 4 network connected monitors (8X6). Should the network devices be accessible on boot?
http://pastebin.com/BJDjbGQu
7083 posts
Location
Tasmania (AU)
Posted 22 October 2016 - 03:33 AM
Just off the top of my head, does it make a difference if you add a sleep(0) to the top of the script?
17 posts
Location
East Coast United States
Posted 22 October 2016 - 01:00 PM
No difference. I've tried adding sleep steps up to 15 in the startup and in my billboard program.
When the server restarts or when I issue a reboot command I get the nil error at line 114 which is the first attempt to use a monitor.
I'll do some more testing to try to isolate it.
7083 posts
Location
Tasmania (AU)
Posted 22 October 2016 - 02:40 PM
I suppose another guess at a workaround might be to throw something like this under line five:
if #monitor < 4 then
sleep(10)
os.reboot()
end
Edited on 22 October 2016 - 12:41 PM
17 posts
Location
East Coast United States
Posted 24 October 2016 - 10:14 PM
I had a disk drive attached to the computer. As soon as I remove it the computer was able to start and find the monitors without throwing an error.