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

quick help

Started by elcid534, 21 October 2012 - 03:39 AM
elcid534 #1
Posted 21 October 2012 - 05:39 AM
FIXED :)/>/>
original post-ish
Spoileri have a simple system and i cant figure out why this isnt working.

function EngStart(side,colour)
redstone.setBundledOutput(side,colour)
os.sleep(.2)
redstone.setBundledOutput(side,colour)
os.sleep(.3)
end

rednet.open("right")
while true do
id,msg = rednet.receive()
if msg == "open" then
EngStart("back",colors.orange)
os.sleep(.1)
EngStart("back",colors.cyan)
os.sleep(.1)
EngStart("back",colors.cyan)
os.sleep(.1)
elseif msg == "close" then
EngStart("back",colors.lightgrey)
EngStart("back",colors.lightgrey)
EngStart("back",colors.magneta)
end
end

it receives thru a modem and sends down a bundled wire behind it.
when it receives open from modem it then turns on orange then stops not even turning off orange.
PixelToast #2
Posted 21 October 2012 - 05:45 AM
os.sleep sould be sleep
elcid534 #3
Posted 21 October 2012 - 05:48 AM
same as sleep still gives error
ie sleep is a wrapper for
os.sleep

proof:
help os
Kingdaro #4
Posted 21 October 2012 - 05:55 AM
Not sure if it'll fix your script, but I found some errors. There are places where you've typed "Engstart" when it should be "EngStart". Lua is case-sensitive.
elcid534 #5
Posted 21 October 2012 - 06:00 AM
Not sure if it'll fix your script, but I found some errors. There are places where you've typed "Engstart" when it should be "EngStart". Lua is case-sensitive.
thx you did fix the error