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

Mining software erroring out

Started by Tiberium_117, 30 October 2016 - 10:25 PM
Tiberium_117 #1
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/FhLhELH2

Button API: http://pastebin.com/z2GAGDBW
Edited on 31 October 2016 - 11:15 PM
KingofGamesYami #2
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
Tiberium_117 #3
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/>
Dog #4
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")
Bomb Bloke #5
Posted 31 October 2016 - 12:43 AM
… or:

modem = peripheral.find("modem")
Tiberium_117 #6
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….
Tiberium_117 #7
Posted 31 October 2016 - 11:56 PM
I got new problem :(/> updated the Topic.
Bomb Bloke #8
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?