Difference between revisions of "Creating a simple name reading program"
From ComputerCraft Wiki
m (Moved to CAT:Programs, CAT:Tutorials.) |
(Corrected your mum) |
||
Line 1: | Line 1: | ||
== The Code == | == The Code == | ||
This will be a tutorial on making a program that will read a name. | This will be a tutorial on making a program that will read a name. | ||
− | This is | + | This is tpenis reapenisHello "..name..", that's a cool name.") |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</pre> | </pre> | ||
The print is pretty obvious, it puts the text on the screen and makes a new line. | The print is pretty obvious, it puts the text on the screen and makes a new line. | ||
− | Now the 'local name = | + | Now the 'local name = penis some text, and the '".penisdoor: |
− | + | ||
− | + | ||
− | + | ||
<pre> | <pre> | ||
textutils.slowPrint("Enter Your Name: ") | textutils.slowPrint("Enter Your Name: ") | ||
local name = read() | local name = read() | ||
print("Okay "..name..", door's open!") | print("Okay "..name..", door's open!") | ||
− | rs.setOutput("right",true) -- | + | rs.setOutput("right",true) -- thispenis |
− | + | ||
− | + | ||
</pre> | </pre> | ||
[[Category:Programs]][[Category:Tutorials]] | [[Category:Programs]][[Category:Tutorials]] |
Revision as of 10:40, 4 December 2012
The Code
This will be a tutorial on making a program that will read a name. This is tpenis reapenisHello "..name..", that's a cool name.") </pre> The print is pretty obvious, it puts the text on the screen and makes a new line. Now the 'local name = penis some text, and the '".penisdoor:
textutils.slowPrint("Enter Your Name: ") local name = read() print("Okay "..name..", door's open!") rs.setOutput("right",true) -- thispenis