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

why it does not work

Started by L001OL, 31 October 2012 - 05:11 PM
L001OL #1
Posted 31 October 2012 - 06:11 PM
Why this program doesnt work:
When I klick on a menu there happens nothing

Cruor #2
Posted 31 October 2012 - 06:19 PM
You don't ask for help in the programs section, moved to ask a pro.
huettner94 #3
Posted 31 October 2012 - 07:22 PM
The folowing errors are in your code:

Line 6: close the print statement like so print("main")

you use if p2 == 4 and 5 and 6 and 7 then , this won't do what you want, you need:

if p2 == 4 or p2 == 5 or p2 == 6 or p2 == 7 then

otherwise it will check if p2 == 4 and 5 != 0 and 6 != null and 7 != null
ChunLing #4
Posted 31 October 2012 - 11:21 PM
I think you might want to use "pl2 > 1 and pl2 < 9" for your conditional. Still, while the conditionals are messed up, you should still be able to activate your menu items by clicking on the exact right spot. Can you?
L001OL #5
Posted 01 November 2012 - 09:37 PM
The folowing errors are in your code:

Line 6: close the print statement like so print("main")

you use if p2 == 4 and 5 and 6 and 7 then , this won't do what you want, you need:

if p2 == 4 or p2 == 5 or p2 == 6 or p2 == 7 then
otherwise it will check if p2 == 4 and 5 != 0 and 6 != null and 7 != null

I think you might want to use "pl2 > 1 and pl2 < 9" for your conditional. Still, while the conditionals are messed up, you should still be able to activate your menu items by clicking on the exact right spot. Can you?


Thanks for help
Jasonfran #6
Posted 01 November 2012 - 10:56 PM
Also what is up with all the elses in your if statements. Unless you need an else don't put one in
L001OL #7
Posted 03 November 2012 - 12:52 AM
The folowing errors are in your code:

Line 6: close the print statement like so print("main")

The line is cutten. Its so: (" Main___________________________")