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

Looking For Some Help

Started by General_Led, 26 August 2013 - 01:53 PM
General_Led #1
Posted 26 August 2013 - 03:53 PM
So I am having a very difficult time with setting up a program on a computer. I am looking for someone that can perhaps hop on my server and help me out. It is a FTB Ultimate server. Any help would be greatly appreciated.
Inumel #2
Posted 26 August 2013 - 04:59 PM
I'm afraid I don't trust this,and I suggest other people to tread lightly.. Accounts can be stolen via other peoples servers.,. I'm not saying you will do it, but its a risk I personally am not going to take, sorry
General_Led #3
Posted 26 August 2013 - 05:12 PM
Please I need help. I can't get Text to show up correctly on monitors. I have asked people on the forums and copied exactly what they told me. I can't get it to work for me. I don't even know how to code lua so what would make you think i can do anything else. This isn't a scam. I am a 15 year old boy that runs a FTB minecraft server that very few people get on. All I need is some help.
Mads #4
Posted 27 August 2013 - 01:40 AM
Learn Lua. http://www.lua.org/pil/contents.html
General_Led #5
Posted 27 August 2013 - 04:11 PM
I really have no need to learn lua. All i need is to get my monitors up and running. Other then that i have no purpose for it.
Kingdaro #6
Posted 27 August 2013 - 05:10 PM
Learning lua will be helpful if you need to do something bigger (or even smaller) than what you're doing now, because then, you'll be able to do your own debugging instead of coming to us every time. And this applies regardless of whether or not you believe you'll use this mod again, because Lua is used a lot outside of CC, and helps in understanding other programming languages.

As for the issue at hand, it would be helpful if you posted the code you're using here (not the code you copied, but the code you have running on your computer) (and use
tags too). You can find the code for your programs in (Your Server Folder)/(Your World Folder)/computer/(Your Computer ID). It's also very, very helpful to tell us the problem you're having, or the error message you're getting. Lastly, help topics go in Ask a Pro.

I'll try to help anyway, even though I doubt you're this clueless.

Wrap a monitor:

mon = peripheral.wrap("top")

"mon" is what lua sees as your monitor, represented in the code. It is the result of what the function "peripheral.wrap" is performing in the world around it. It finds a monitor, "wraps" it, and stores it to whatever you want to name it. You could also replace "mon" with "monitor" or just "m" and it'd still work.

There are more than one ways to write to a monitor, but I find the easiest way (if you're not doing anything too complicated, like this) is to "redirect" the terminal to the monitor, which means that any text that would normally print to your computer's screen, would be printed to the monitor instead.

To redirect, you need to use the term.redirect() function.

term.redirect(mon)

At this point, anything you do will be shown on the monitor, such as print()ing text. You can return control to the computer by using term.restore().

Example:

mon = peripheral.wrap("top")
term.redirect(mon)

print("Hello!")
print("I'm writing text on a monitor!")

term.restore()
Lyqyd #7
Posted 27 August 2013 - 06:40 PM
This topic is not currently in a format appropriate for Ask a Pro, as no code has been provided, nor help with existing code requested. This is a request for someone to do things for him, so it belongs in General.
General_Led #8
Posted 27 August 2013 - 07:15 PM
Is there a way to change the text size?
Lyqyd #9
Posted 27 August 2013 - 08:54 PM
monitor.setTextScale(n)

Where monitor is the variable containing your wrapped monitor table, and n is a multiple of 0.5 between 0.5 and 5.0, inclusive.
PixelToast #10
Posted 27 August 2013 - 09:05 PM
wiki: http://computercraft.info/wiki/Main_Page
lua manual: http://www.lua.org/manual/5.1/