Posted 15 April 2014 - 03:31 AM
I'm attempting at the beginning of an OS and I'm trying to make a little loading screen, but i'm having troubles with it.
I'm getting
in the directory data/img/os/ there are two images, img.OS1 and img.OS2. but for some reason, it only loads the first, data/img/os/img.OS1 then throws the error.
The name of the program is os.load. (Just in case it matters)
pastebin get jXMHcT6A
I'm getting
paintutils:92: attempt to get length of local 'tImage' (a nil value)
in the directory data/img/os/ there are two images, img.OS1 and img.OS2. but for some reason, it only loads the first, data/img/os/img.OS1 then throws the error.
The name of the program is os.load. (Just in case it matters)
shell.run("clear")
--Image Loading Func
function loadImage(dir,x,y)
img=paintutils.loadImage(dir)
paintutils.drawImage(img,x,y)
end
----
shell.run("cd //")
----
--Tables
img = {"data/img/os/img.OS1","data/img/os/img.OS2",}
--
for i=1,5 do
loadImage(tostring(img[1]),1,1)
sleep(.5)
loadImage(tostring(img[2]),1,1)
sleep(.5)
end