Posted 09 November 2012 - 10:22 PM
Hi all!
I have recently started to work with computercraft (in tekkit) and i made a code for my distribution system im going to make.
I have read some tutorials and i got this:
It has to ask what item you want (object) for example object a
It has to ask how many you want, which is going to be used with redpulse.
The ifelse are used so i can add more items (for example, it can read if i want iron, dirt, cobble or gunpower)
For testing purposes, i have it had print a text, but this program doesnt seem to work.
I get the error
I hope you can help me find out what i did wrong (its probebly something very stupid) since i already tried fixing it.
Thank you!
I have recently started to work with computercraft (in tekkit) and i made a code for my distribution system im going to make.
I have read some tutorials and i got this:
print ("Please enter object you want")
object = read("*")
print ("How many?")
number = read("*")
if object == a then
print ("Works a")
ifelse object == b then
print ("Works b")
else print ("No valid object")
Explaination:It has to ask what item you want (object) for example object a
It has to ask how many you want, which is going to be used with redpulse.
The ifelse are used so i can add more items (for example, it can read if i want iron, dirt, cobble or gunpower)
For testing purposes, i have it had print a text, but this program doesnt seem to work.
I get the error
bios:206: [string "Nameprogram"]"7" '=' expected
I hope you can help me find out what i did wrong (its probebly something very stupid) since i already tried fixing it.
Thank you!