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

My program just doesn't feel like working :(

Started by bigbyl, 14 May 2017 - 02:10 PM
bigbyl #1
Posted 14 May 2017 - 04:10 PM
I have been trying for hours to get my little interactive program to work, but i seem to be clueless about the problem.

If anybody could give me a hand i would GREATLY appreciate it :D/>.

Here are the links to both my main program and the side program which it uses.

main program: https://pastebin.com/TqGawaRJ

side program: https://pastebin.com/5kEm7du3

Thanks a lot in advance! ^_^/>
Lyqyd #2
Posted 14 May 2017 - 04:35 PM
Moved to Ask a Pro.
Lupus590 #3
Posted 14 May 2017 - 05:17 PM
Two questions:
  • What should the program be doing?
  • What is it doing?
bigbyl #4
Posted 14 May 2017 - 05:47 PM
Two questions:
  • What should the program be doing?
  • What is it doing?

The program should just display a menu with 2 buttons: "Who is Vega" and "Facility Map"

Upon clicking on "Who is Vega" a short description of Vega will be shown (this button works perfectly)

However the second button doesn't seem to work. Whenever i press it the menu resets itself and nothing happens. The "Facility Map" button should load the second program and display a map of the facility.

No erros is given on the computer, but for some reason it just won't load the side program.
Edited on 14 May 2017 - 04:39 PM
Lupus590 #5
Posted 14 May 2017 - 06:48 PM
You clear the screen on your next loop, so you don't get any time to see the map. Stick another sleep in there or get the user to have to press another button to go back to the menu.


If the above doesn't fix it then try these:
  • Confirm that it registers your button press, get it to print out something when the button is pressed.
  • Check that your 'second program'/API works, make another program which just calls the map drawing function and check that the map draws