function touch(xmin,xmax,ymin,ymax)
local b,e,x,y=os.pullEvent("mouse_click")
if e=="mouse_click" then
if b=="1" then
if x >= xmin and x <= xmax and y >= ymin and y <= ymax then
return "c1"
elseif
e=="mouse_click" then
if b=="2" then
if x>=xmin and x<=xmax and y>=ymin and y<=ymax then
return "c2"
else
end
end
end
end
end
end
and here is my code http://pastebin.com/SahWFJ4W Please help me if you find the time or redirect me to the proper thread if I made a mistake by posting.
-Best Regards
Chain
Sorry pasting this from pastebin screwed up the spacing.