Posted 07 April 2018 - 12:37 PM
Even though I have barely started with my OS, I want to have a setup program (on a diskette for the start) right away. So, I started with the good ol' GUI setup program. When I do paintutils.loadImage() on my image (disk/bkg.npf), seems to do "paintutils.lua:38: attempt to call nil" from the Lua prompt. From my disk/startup.lua, it does "startup.lua:4: bad argument #1 (expected table, got nil). Is there a reason for this happening?
Unfinished setup program:
bkg.npf (from the edit perspective):
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
Unfinished setup program:
local image = paintutils.loadImage("bkg.npf")
local function clearScreen()
paintutils.drawImage(image, 1, 1)
end
clearScreen() --draw the screen for the first time
bkg.npf (from the edit perspective):
Spoiler
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
b0000000000000000000000000000000000000000000000000b
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb