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

Sorry but i'm a noob and have questions

Started by hipie1234567, 19 April 2013 - 09:19 AM
hipie1234567 #1
Posted 19 April 2013 - 11:19 AM
well as soon as I got my first post figured out I realized i have lots more questions so if anyone would like to help just say the number of one of my questions and an answer.
1. how do you make a modem go wireless
2.how do you control wirelessly
3.can and how do you extract files from a floppy.
4.(not really related to computer-craft) what is probably the best programming computer(I need it for Duke T.I.P and my "gifted" self)
5.what is the deal with advanced computers
6. how do you use the red-stone apis
7. and finally is there anyone who has a link or would be willing to teach a computer language.
sorry for my noobishness but i just started trying to be a programmer 2 days ago.☺☻☺☻☺☻☺☻☺♂♀§
8. how do i link my paste-bin files to a topic.
Smiley43210 #2
Posted 19 April 2013 - 11:42 AM
  1. http://computercraft...wiki/Modem_(API)
  2. Wireless: http://computercraft...wiki/Modem_(API) or Networking cables: http://computercraft...Peripheral_(API)#Remote_Peripherals_using_Networking_Cables
  3. http://computercraft...o/wiki/Fs_(API)
  4. What about advanced computers? They can do more than regular ones. For example, advanced computers support mouse clicking and colored text/backgrounds. See http://computercraft...vanced_Computer
  5. http://computercraft...i/Redstone_(API) If you need more help, say so.
  6. Paste the paste bin link in the topic? I don't think you need an example, but here's one nonetheless: http://pastebin.com/JNDK2ZKV
Sammich Lord #3
Posted 19 April 2013 - 11:51 AM
Depends on what you are going to be programming. I would use completely different languages for developing websites then I use for developing games.
hipie1234567 #4
Posted 19 April 2013 - 12:08 PM
well sammich Lord i was thinking more along the lines of robots
tatskaari #5
Posted 19 April 2013 - 07:45 PM
As for wireless communication, I would start with the rednet API. It seams a lot simpler as you don't have to understand events or channels. Here are two programs. The first will listen for a message and then reply. The second will send a message a
program 1:

rednet.open("left")
senderID, message, distance = rednet.receive() --waits forever for a message
if message == "hi" then
	print("received message: " .. message) --".." will concatenate strings
end
rednet.send(senderID, "Hi")
rednet.close("left")
Program 2:

rednet.open("left")
rednet.broadcast("hi")
id, message, dist = rednet.receive(5) -- waits for 5 secs to get a message
print(message)
rednet.close("left")
Entropy #6
Posted 19 April 2013 - 09:27 PM
Well, program 1 above has a spelling error and will only send a message back if the message is "hi" But you should get what he's trying to say.
hipie1234567 #7
Posted 20 April 2013 - 05:09 AM
hey can you put pictures into minecraft on monitors oh and also can you set a function to repeat itself such as turtle.forward(4) and then the turtle moves 4 spaces forward.
tatskaari #8
Posted 20 April 2013 - 09:27 AM
There are for loops that work like:

for i=1, 10 do
	print(i)
end
In this case, 'i' starts at 1, increments to 10 and repeats everything in the loop.
You can define how much to increment i by like:

for i=1, 10, 2 do
	 print(i)
end
which will increment by 2 each time it loops through.
There are also while loops that work like:

i = 1
while i =< 10 do
	print(i)
	i = i + 1
end
This will do the same as the first for loop.
The last type of loop is the repeat loop. This is the same as the while loop but checks for the condition at the end of each loop rather than the beginning and will stop when the condition is true rather than false.

i = 1
repeat
	print(i)
	i = i + 1
until i == 11

More info can be found here: lua loops

As for pictures, not by default. You can set the background colour of each character in advanced terminals. If you then printed a space, you could make a picture out of those but there is no way to load a picture into computercraft without doing it all from scratch.

Also, I'm pretty sure the last programs I posted work fine (apart from the typo). Program 1 is listening for "hi" and program 2 sends "hi".
hipie1234567 #9
Posted 20 April 2013 - 10:52 AM
i already know about loops i was just curious if it got any shorter
SuicidalSTDz #10
Posted 20 April 2013 - 11:09 AM
If what gets any shorter?