18 posts
Posted 30 October 2016 - 11:25 PM
Hello there, i am a basic coder trying big for my first Solo code, i am making this code able to operation a Frame Quarry from project red, (the replacement of red power) via a Project red Bundled Cable and wireless redstone Chicken bone editon.
All Crashing bugs and GPS problems fixed, now the code it complete with only one problem…
when i right click any of the buttons i made, it does not register that i clicked them, and does nothing….
The Code i am making is using Direwolf20's Button API…
if anyone can help, It would be really apprehiated and save what is left of my hair :P/>
Updated Code:
http://pastebin.com/FhLhELH2Button API:
http://pastebin.com/z2GAGDBW
Edited on 31 October 2016 - 11:15 PM
3057 posts
Location
United States of America
Posted 30 October 2016 - 11:33 PM
function getClick()
event,side,z,y = os.pullEvent("monitor_touch") --# issue is in this line, see if you can spot it ;)/>
button.checkxy(x, y)
end
Hint: You're passing a nil argument to button.checkxy
18 posts
Posted 30 October 2016 - 11:49 PM
function getClick()
event,side,z,y = os.pullEvent("monitor_touch") --# issue is in this line, see if you can spot it ;)/>/>
button.checkxy(x, y)
end
Hint: You're passing a nil argument to button.checkxy
Thank you. It stopped Crashing, now just to figure out why it is not doing anything :P/>
1220 posts
Location
Earth orbit
Posted 31 October 2016 - 12:18 AM
Not that this will fix everything, but I did notice that on line 15 of your first program you have
modem = peripheral.find("top")
That probably should be
modem = peripheral.wrap("top")
7083 posts
Location
Tasmania (AU)
Posted 31 October 2016 - 12:43 AM
… or:
modem = peripheral.find("modem")
18 posts
Posted 31 October 2016 - 06:17 PM
Not that this will fix everything, but I did notice that on line 15 of your first program you have
modem = peripheral.find("top")
That probably should be
modem = peripheral.wrap("top")
… or:
modem = peripheral.find("modem")
That didn't work, I am going to change the code to make it mandatory to have wireless modem on it since the if then statement didn't work….
18 posts
Posted 31 October 2016 - 11:56 PM
I got new problem :(/> updated the Topic.
7083 posts
Location
Tasmania (AU)
Posted 01 November 2016 - 11:45 AM
Please don't wipe your initial posts; this makes the ensuing conversation harder to read. Just post new issues about your projects at the bottom of their threads, and let the discussion continue from there.
Anyway:
function getClick()
event,side,z,y = os.pullEvent("monitorTouch")
button.checkxy(x, y)
end
z?