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

AppleOS | No copying intended

Started by Gumball, 26 August 2014 - 01:57 AM
Gumball #1
Posted 26 August 2014 - 03:57 AM
This is my little OS called AppleOS, right now im currently trying to add a function where theres buttons, using this code:
http://pastebin.com/iUvbX53x
If you could pls fix that for me and put the pastebin links in the comments, I will be grateful AND put your name in the credits!
That should get it into the advanced stage where it gets turned into an actual GUI, than where it just installs files with pastebin.
Run these command to download the OS:
"pastebin get KnJXJcvt Update"
and then run: "Update"

Feel free to use some of its code or edit its code and upload it as your own OS! :D/> Just make sure to give me some credit :)/>
Thanks!
-bluebird173

Nvm got this all fixed, already added tons of code to my OS, even rebuilt it from the ground up

CLOSED
Edited on 31 August 2014 - 02:36 AM
Lyqyd #2
Posted 26 August 2014 - 05:42 AM
Moved to Ask a Pro. Feel free to ask any questions you have about fixing your code.
Lua.is.the.best #3
Posted 26 August 2014 - 09:32 PM
Indent your code. (you forgot two indents, function and while start blocks)
Also, I'm pretty sure you switched the greater and less than signs up.
And you can't see where you should click.

function button()
  paintutils.drawLine(2,1,8,1,colors.green)
  
  while true do
      event, X, Y = os.pullEventRaw()
	  if event == "mouse_click" then
		if X >=2 and X <=8 and Y==1 and button ==1 then
		  print("hi")
		end
	  end
  end
--A end was forgotten.
--Plus, the slc thing is unneeded.
Edited on 26 August 2014 - 07:36 PM
Gumball #4
Posted 27 August 2014 - 02:21 AM
Indent your code. (you forgot two indents, function and while start blocks)
Also, I'm pretty sure you switched the greater and less than signs up.
And you can't see where you should click.

function button()
  paintutils.drawLine(2,1,8,1,colors.green)
  
  while true do
	  event, X, Y = os.pullEventRaw()
	  if event == "mouse_click" then
		if X >=2 and X <=8 and Y==1 and button ==1 then
		  print("hi")
		end
	  end
  end
--A end was forgotten.
--Plus, the slc thing is unneeded.
Its not working :(/>
Edited on 30 August 2014 - 03:09 AM
Gumball #5
Posted 27 August 2014 - 02:28 AM
Nvm fixed this!
Edited on 30 August 2014 - 03:08 AM