Jump to content




Menu won't activate Redstone bundles?

lua

  • You cannot reply to this topic
8 replies to this topic

#1 Tassyr

  • Members
  • 80 posts

Posted 02 April 2013 - 08:57 PM

First off, I apologize if this counts as spamming and will delete it if told- it's just that I accidentally set the last post I made as 'finished,' only to find out it wasn't. So I have a program that should let me select an option using up and down arrow keys in combination with the enter key, after a bit of help. So far so good. Then I edited it to put [] around the option selected- and suddenly it broke. Can someone help me? I've been beating my head against this for most of a day.

Spoiler


#2 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 02 April 2013 - 09:22 PM

Specifically, what is not working here? On line 61 you are missing an end parentheses and once you fix that the GUI will work fine. But your title mentions Redstone bundles. Are they not working at all?

Edit:
For clarification, this is the line that was bad:
term.setCursorPos(9,(input + 5) <--Missing that end parentheses there!


#3 Tassyr

  • Members
  • 80 posts

Posted 02 April 2013 - 09:32 PM

They're not working in the slightest! I select the option, hit enter, and nothing changes- they're supposed to deactivate (so a NOT circuit can turn the reactor on) but they just kinda. Sit there in the on position. Also ch ecking to see if I left that parenthesis in- I had to copy this by hand, since I used up my pastebin limit.

Yeah, that parenthesis is in the original. >.<

#4 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 02 April 2013 - 09:55 PM

View PostTassyr, on 02 April 2013 - 09:32 PM, said:

They're not working in the slightest! I select the option, hit enter, and nothing changes- they're supposed to deactivate (so a NOT circuit can turn the reactor on) but they just kinda. Sit there in the on position. Also ch ecking to see if I left that parenthesis in- I had to copy this by hand, since I used up my pastebin limit.

Ouch! That sucks.

But your problems lies in the fact that you reset the c variable every time you call the drawArt() function, meaning that even though you set the bundled output to a new value it will revert back immediately. Put the c variable declaration outside of the drawArt() function and then see how it works.

Note: I can't actually test things right now because the computer I'm on now can't really handle minecraft well. But I'm almost absolutely positive this is your only problem in terms of the output not changing. Your code might contain other bugs though.

#5 Tassyr

  • Members
  • 80 posts

Posted 02 April 2013 - 10:09 PM

About to test it. This is sort of a giant mashup code- Someone else showed me how to make the menu, I decided I knew what I was doing and reordered the menu... yeah. XD Testing now.

#6 Tassyr

  • Members
  • 80 posts

Posted 02 April 2013 - 10:16 PM

Well, I removed the block of text about c- that was initially meant to be what happened on startup, and I need to figure out where the heck I put it now- because without it I get an odd error. "colors:30: too few arguments."

See, what it's meant to do is set red/black/white/green to 'on,' and then set the related variables to 'false' for the first time.

#7 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 02 April 2013 - 10:27 PM

View PostTassyr, on 02 April 2013 - 10:16 PM, said:

Well, I removed the block of text about c- that was initially meant to be what happened on startup, and I need to figure out where the heck I put it now- because without it I get an odd error. "colors:30: too few arguments."

See, what it's meant to do is set red/black/white/green to 'on,' and then set the related variables to 'false' for the first time.

Did you completely remove it? You just need to move the declaration outside of the function. I would put it into the first few lines where it has this:
w,h = term.getSize()
hW = w/2
hH = h/2
--Add it in here, keeping everything about the declaration the same. You're only moving it, not really changing anything.

Edit: Here's the full code in case you want it.
Spoiler

Also you have some unecessary variables in there (I never actually see you use the color variables such as white = false and such other than to change the value). But get the program working first and then go back and see if there's anything you don't use.

#8 Tassyr

  • Members
  • 80 posts

Posted 02 April 2013 - 10:31 PM

You are a genius and all sorts of wonderful things should happen to you! (Hey, it's 2:30 am. That's about as eloquent I can get- but I AM excited and grateful. You've FIXED it! :D)

#9 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 03 April 2013 - 03:12 AM

View PostTassyr, on 02 April 2013 - 10:31 PM, said:

You are a genius and all sorts of wonderful things should happen to you! (Hey, it's 2:30 am. That's about as eloquent I can get- but I AM excited and grateful. You've FIXED it! :D)

Lol well I'm no genius but thanks for the praise :) Glad I could help.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users