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

(Marked For Deletion)

Started by quipucito, 04 November 2012 - 04:34 AM
quipucito #1
Posted 04 November 2012 - 05:34 AM
Post:
SpoilerThe startup script:
Spoiler

while true do
rs.setOutput("top", true)
sleep("1")
rs.setOutput("top", false)
sleep("1")
term.clear()
shell.run("shell")
end

The error message:
Spoiler

CraftOS 1.4
bios:133: Expected Number
>

The bios.lua file, lines 131-137:
Spoiler

-- Install globals
function sleep( _nTime )
	local timer = os.startTimer( _nTime )
	repeat
		local sEvent, param = os.pullEvent( "timer" )
	until param == timer
end

Where is the problem?
Sebra #2
Posted 04 November 2012 - 05:39 AM
You send string, expected number.
Pharap #3
Posted 04 November 2012 - 06:47 AM
sleep("1")
"1" is a string, 1 is a number, you need to remove the quote marks to make it a number:
sleep(1)
robhol #4
Posted 04 November 2012 - 10:14 PM
Just in case it wasn't clear, it's not the bios' fault, you dun goofed.
cheekycharlie101 #5
Posted 05 November 2012 - 03:17 AM
This is not a bug, in future please post your program errors in the ask a pro forum. thanks
-Cheeky
quipucito #6
Posted 05 November 2012 - 04:04 AM
thx i didn't realize that… lol I am usually really good at these things.

I thought it was in the program. I was mistaken, sorry.
Cruor #7
Posted 05 November 2012 - 06:47 AM
Thread locked. Report the thread next time you wish for it to be locked, much easier :3