Posted 17 September 2014 - 03:22 PM
The code is:
local monitor = peripheral.wrap("left")
local ticketMachine = peripheral.wrap("right")
while true do
monitor.setCursorPos(10,6)
monitor.setBackgroundColor(colors.red)
monitor.setTextColor(colors.white)
monitor.write("mall")
event,side,x,y = os.pullEvent("monitor_touch")
if x < 25 and x > 10 and y==6 and side == "left" then
ticketMachine.createTicket("mall")
end
end
I tried typing it from bottom to top and from top to bottom. When I typed it from bottom to top and connected it to a monitor it said, "attempted to call nil. When I typed it from top to bottom it said Bios 339: [string"mall"] expected.
Im fairly new to this mod and I'm not sure what I did wrong. Thank you in advance
local monitor = peripheral.wrap("left")
local ticketMachine = peripheral.wrap("right")
while true do
monitor.setCursorPos(10,6)
monitor.setBackgroundColor(colors.red)
monitor.setTextColor(colors.white)
monitor.write("mall")
event,side,x,y = os.pullEvent("monitor_touch")
if x < 25 and x > 10 and y==6 and side == "left" then
ticketMachine.createTicket("mall")
end
end
I tried typing it from bottom to top and from top to bottom. When I typed it from bottom to top and connected it to a monitor it said, "attempted to call nil. When I typed it from top to bottom it said Bios 339: [string"mall"] expected.
Im fairly new to this mod and I'm not sure what I did wrong. Thank you in advance
Edited on 17 September 2014 - 03:13 PM