Posted 26 March 2012 - 08:00 PM
I am a newb programmer, and I have created my first program that I wrote in free time at school. I want someone to please test it, and if it doesn't work to tell me what needs fixed. It is a redstone program that has you select the side to send the pulse.
Heres the code
__________________________________________________________________________________________________________
off = off
bottom = bottom
back = back
front = front
right = right
left = left
print ("Which side will the redstone pulse be sent?")
if "top" then
redstone.setOutput ("top", true)
if "bottom" then
redstone.setOutput ("bottom", true)
if "back" then
redstone.setOutput ("back", true)
if "front" then
redstone.setOutput ("front", true)
if "right" then
redstone.setOutput ("right", true)
if "left" then
redstone.setOutput ("left", true)
if "off" then
redstone.setOutput ("top", false)
redstone.setOutput ("bottom", false)
redstone.setOutput ("back", false)
redstone.setOutput ("front", false)
redstone.setOutput ("right", false)
redstone.setOutput ("left", false)
os.reboot()
print ("Proccessing………")
end
________________________________________________________________________________________________________
Constructive critisim would be welcome, remember this is my first script I didn't just copy! All is used from my mind.
If you're wondering how I learned it, I had to copy a password door script a couple times yesterday. That was kinda like studying lua for me.
os.shutdown()
print ("If you help, thank you!")
end
Heres the code
__________________________________________________________________________________________________________
off = off
bottom = bottom
back = back
front = front
right = right
left = left
print ("Which side will the redstone pulse be sent?")
if "top" then
redstone.setOutput ("top", true)
if "bottom" then
redstone.setOutput ("bottom", true)
if "back" then
redstone.setOutput ("back", true)
if "front" then
redstone.setOutput ("front", true)
if "right" then
redstone.setOutput ("right", true)
if "left" then
redstone.setOutput ("left", true)
if "off" then
redstone.setOutput ("top", false)
redstone.setOutput ("bottom", false)
redstone.setOutput ("back", false)
redstone.setOutput ("front", false)
redstone.setOutput ("right", false)
redstone.setOutput ("left", false)
os.reboot()
print ("Proccessing………")
end
________________________________________________________________________________________________________
Constructive critisim would be welcome, remember this is my first script I didn't just copy! All is used from my mind.
If you're wondering how I learned it, I had to copy a password door script a couple times yesterday. That was kinda like studying lua for me.
os.shutdown()
print ("If you help, thank you!")
end