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

non functional button

Started by Hydrotronics, 26 February 2016 - 04:40 PM
Hydrotronics #1
Posted 26 February 2016 - 05:40 PM
Here is something that hasn't working since yesterday.
I am making the login screen for my OS called HydroTech using my PAPI and IAPI.
When you click the bars to type Username and Password, it registers perfectly fine.
When you click the button, it knows you're clicking it but it won't do anything.
You need to install the PAPI and IAPI and run them to let the program work, this will be automated at later stages. Debug messages appear at the bottom left. ding means you clicked on the confirm button,
Startup File
PAPI
IAPI
I didn't use interact.drawButton for my button, as I couldn't be bothered to get that to work yet.
The button ranges from line 83 to 125
Edited on 26 February 2016 - 06:24 PM
TrumpetMiner #2
Posted 13 March 2016 - 01:12 AM
I don't see a problem, when I hit the button, it says:

"button 1 was pressed at X:31 Y:16
ding"

What isn't working?
Hydrotronics #3
Posted 29 May 2016 - 09:25 PM
I don't see a problem, when I hit the button, it says:

"button 1 was pressed at X:31 Y:16
ding"

What isn't working?

it's not running shell.run() after the ding
Dragon53535 #4
Posted 29 May 2016 - 11:05 PM
Your if statements are incorrect.


if not pass == cPass then
This structure of if statement will NOT do what you want. I will add parenthesis to show you what the computer sees.


if (not pass) == (cPass) then
If you may notice it applies the inversion to pass, not the result of the ==.

What you would want to do is remove the word not, and change the == to be ~=.
Hydrotronics #5
Posted 31 May 2016 - 04:03 PM
Your if statements are incorrect.


if not pass == cPass then
This structure of if statement will NOT do what you want. I will add parenthesis to show you what the computer sees.


if (not pass) == (cPass) then
If you may notice it applies the inversion to pass, not the result of the ==.

What you would want to do is remove the word not, and change the == to be ~=.

owh, ta!