User:Merlin11188/Draft: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Merlin11188
Began work on tutorial
>Merlin11188
Added a picture; added locations to the descriptions; reordered slightly
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
{| style="{{border-radius|4px}}; background-color: #ffdddd; border: dashed 2px #aa0000; border-top-color: #ff0000; border-left-color: #ff0000; margin: auto 10px; padding: 2px; display: block"
{{User:Merlin11188/Templates/NoEdit}}
|{{ImageLink|image=ArrowSquare.png|link=User:Tomtomn00/Sandbox/NoEditTemplate}}
|<big>'''Do not edit!'''</big><br><small>The creator of this subpage does not want it to be edited without permission.</small>
|}
 
==Hello World==
 
The language I'm teaching you is called ''Lua''. A tradition of programming languages is to start off the learner with a ''Hello World'' program. So what is a ''Hello World'' program? It is a program that writes the words "Hello World" to the [[Output|output]]. Here it is in Lua:
{{Example|{{Code and output|code=
print("Hello World")
|output=
Hello World
|fit=output}}}}
 
Ta-da! For now and the rest of the tutorial, that box on the left is the output. Keep that in mind. [[Function_Dump/Core_Functions#print_.28.C2.B7.C2.B7.C2.B7.29|Print]] is our function for writing to the output. When we want to print string literals (words, like ''Hello World'') to the output, we '''must''' put them in quotes. Here's another example:
 
{{Example|{{Code and output|code=
print("Hi Newcomer!")
|output=
Hi Newcomer!
|fit=output}}}}




{{Stub}}
{|
|[[File:Home_Subpage.png|frame|A picture of the 'Home' tab on the submenu in 'My ROBLOX'.]] <br/>
|}
__TOC__
__TOC__




==Beginning==
===Character and Notifications===
===Terminology===
{|
|On the far left of the page there is a picture of [[My_Character|your character]]. Underneath, there is a link to your system notifications.
|[[File:Avatar_Notifications.png|frame|A picture of [[My_Character|your character]] with system notifications beneath it.]]
|}


There are three terms I want you to know before we continue:
===Best Friends===
*{{`|code}} refers to '''anything''' written in Lua.
{|
*{{`|chunk}} refers to '''one''' line of {{`|code}} in Lua.
|Underneath of your avatar and notification box is your [[Friends#Best_Friends|best friends]] list. Here you can see what your best friends are doing (from their [[My_Home#Status_Update|shout box]]) and whether or not they're online.
*{{`|script}} refers to '''multiple''' {{`|chunk}}s that accomplish a specific task in Lua.
|[[File:Best_Friends.png|frame|This a list of your [[Friends#Best_Friends|best friends]] and their most recent shouts!]]
*{{`|character}} refers to any of the [http://wiki.roblox.com/index.php/File:Ascii_Table.png ASCII Values] (numbers, letters, spaces, enter key, down arrow, etc.)
|}


===Comments===
===Status Update===
{|
|You can use this so that people who visit your profile can see what you're up to.
|[[File:Status Update.png|frame|This is the status update bar. People who have you as their [[Friends#Best_Friends|best friend]] will see it on their [[My_Home|home]]!]]
|}


Before I start explaining the stuff you can do in Lua to you, there is something I need to explain to you that I'm going to use a lot in this tutorial: ''Commenting''. Comments are things that are '''not''' executed by Lua. A comment can contain any characters because it doesn't need to be read.  
===Feed===
{|
|Your feed is in the center of the page, just beneath your status update box. Your feed is a way to keep you updated with all of your groups. Every time someone uses the shout box in one of your [[groups]], you're updated here!
|[[File:Feed bar.png|frame|This is for your feed—all of your [[groups]]' shouts go here.]]
|}


====One-Line comments====
===Recently Played Games===
{|
|On the far right is the 'Recently Played Games' box. Your most recently played games can be seen here. If you want a larger list, you can click the '''See More''' button.
|[[File:Recently_Played_Games.png|frame|This is a list of your most recently played [[game]]s.]]
|}


A one-line comment is made with {{`|--}}. It lasts for the rest of the line. Here are some examples:
===Facebook Connect===
{{Example|{{Code and output|code=
{|
print("Hello world") -- This will print Hello world to the output!
|On the far right, underneath of the 'Recently Played Games' box is the Facebook connect box. If you have a Facebook account, you can link it to your ROBLOX account! See [[connecting your account to Facebook]] for more info.
-- I'm invisible! print("Hi"). Hi won't be printed to the output!
|[[File:FacebookConnect_Unconnected.png|frame|Facebook connect. You can use this to link your Facebook account to your [[Roblox|ROBLOX]] account! Your personal info will '''not''' be shared with other users!]]
|output=
|}
Hello world
|fit=output}}}}
 
====Multi-Line Comments====
 
A multi-line comment starts with --[[ and ends with <nowiki>]]</nowiki>. Everything between the opening and the closing is treated as a comment, even if the comment is only in the middle of the line.  
{{Example|{{Code and output|code=
print("Hello World")--[[
I'm a very long comment.
In fact, I last multiple lines.
Should I be discovered, I must… but that won't happen.
]]|output=
Hello World
|fit=output}}}}


''A multi-line comment '''cannot''' be placed inside of a string literal (inside of quotation marks)!'' You must put it elsewhere. Here are more examples:
<!--
{{Example|{{Code and output|code=
{| class="wikitable" style="border-spacing: 0px; padding: 0px;"
print("Hello M--[[I'll never be found!]]y Friend!")
|-
--[[They'll never catch me!]]print("HI")
|[[File:Avatar + Notifications]]
|output=
|[[File:Status_Update.png]]
Hello M--[[I'll never be found!]]y Friend!
|[[File:Recently_Played_Games.png|287px]]
HI
|-
}}}}
|[[File:Best_Friends.png]]
|<div style="top:0px;">[[File:Feed_bar.png]]</div>
|[[File:FacebookConnect_Unconnected.png]]
|}-->

Latest revision as of 03:31, 12 March 2012

Do not edit!
The creator of this subpage does not want it to be edited without permission. Please discuss any changes that you think are relevant on the talk page.


Stub icon Stub
This article is a stub. If you think you know more about this than we do, please help us by contacting a writer.
Thank you!


A picture of the 'Home' tab on the submenu in 'My ROBLOX'.


Character and Notifications

On the far left of the page there is a picture of your character. Underneath, there is a link to your system notifications.
A picture of your character with system notifications beneath it.

Best Friends

Underneath of your avatar and notification box is your best friends list. Here you can see what your best friends are doing (from their shout box) and whether or not they're online.
This a list of your best friends and their most recent shouts!

Status Update

You can use this so that people who visit your profile can see what you're up to.
This is the status update bar. People who have you as their best friend will see it on their home!

Feed

Your feed is in the center of the page, just beneath your status update box. Your feed is a way to keep you updated with all of your groups. Every time someone uses the shout box in one of your groups, you're updated here!
This is for your feed—all of your groups' shouts go here.

Recently Played Games

On the far right is the 'Recently Played Games' box. Your most recently played games can be seen here. If you want a larger list, you can click the See More button.
This is a list of your most recently played games.

Facebook Connect

On the far right, underneath of the 'Recently Played Games' box is the Facebook connect box. If you have a Facebook account, you can link it to your ROBLOX account! See connecting your account to Facebook for more info.
Facebook connect. You can use this to link your Facebook account to your ROBLOX account! Your personal info will not be shared with other users!