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

The x and y coords dont work properly for me

Started by Engineer, 07 March 2013 - 02:38 AM
Engineer #1
Posted 07 March 2013 - 03:38 AM
Hi,

as I provided in the title, my x and y coords dont work properly and I am aware that it is because my programming 'skills'.
The rest of codes work, except line 113:
Simple Store program

Thanks in advance as always :P/>

Engineer
theoriginalbit #2
Posted 07 March 2013 - 03:57 AM
Your statement

if x > 42 and 50 < x and y == 1 then
Checks if x is greater than 42 and that 50 is less than x. so that means that only 51 will trigger it. since 51 is both larger than 42 and 50. So make it this and it will be fine.

if x > 42 and x < 50 and y == 1 then
Engineer #3
Posted 07 March 2013 - 04:02 AM
I am very derpy, the worst part is that I have made buttons that work and I just could have looked at that.. What was I even thinking?!

Well thanks BIT, for correcting me :)/>
theoriginalbit #4
Posted 07 March 2013 - 07:53 PM
no problems. i will admit that it took me a little while to notice it too.