This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
NexusNovaz's profile picture

OS Troubles

Started by NexusNovaz, 09 April 2016 - 11:34 PM
NexusNovaz #1
Posted 10 April 2016 - 01:34 AM
So i am trying to make an OS and i keep getting "window:94: Expected string, string, string" the code is

local function main()
drawScreen(bg_col, bg)
while brunning do
e = {os.pullEvent()}
	    if slc == 0 then
			    drawScreen(bg_col, bg)
			    if e[1] == "mouse_click" then
					    if e[2] == 1 then
							    if e[3] >= 1 and e[3] <= 7 and e[4] == 1 then
									    slc = 1
									    drawMenu()
							    end
					    end
			    end
	    elseif slc == 1 then
			    drawMenu()
			    menuClick()
	    end
end
end
Bomb Bloke #2
Posted 10 April 2016 - 03:02 AM
The error is likely caused by setting an invalid text colour with setTextColour or setBackgroundColour, and then later triggered when you attempt to write with it.

If you're still stuck, provide your full code. If you believe it to be too long for a forum post than dump it on pastebin and provide a link here.
NexusNovaz #3
Posted 10 April 2016 - 11:25 AM
My main code is here: http://pastebin.com/dJhvwEe2
Kernal code: http://pastebin.com/LrFrEwZz
Error Catching: http://pastebin.com/hVDMy9R9
.conf file: http://pastebin.com/0RVFEUZN
Bomb Bloke #4
Posted 10 April 2016 - 03:18 PM
Indeed, it looks strongly like you've got some invalid colours going on there. Line 9 of your "main code" attempts to read a number from line 7 in your config file, when it should be targeting line 6. Double check that all those config values are being read in correctly and then see how you go from there.