of     1   

2tallhank
#63521939Monday, February 27, 2012 3:00 AM GMT

[ Content Deleted ]
2tallhank
#63522189Monday, February 27, 2012 3:04 AM GMT

[ Content Deleted ]
Riderj
#63522235Monday, February 27, 2012 3:05 AM GMT

No, but it is convention to use tables when entering a new scope. [[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]]
Riderj
#63522274Monday, February 27, 2012 3:06 AM GMT

tabs* Wow what possessed me to say tables :O [[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]]
2tallhank
#63522286Monday, February 27, 2012 3:06 AM GMT

[ Content Deleted ]
Navydev
#63522316Monday, February 27, 2012 3:07 AM GMT

You dont have to, but it makes it easier for you to read and for others as well. It also shows how functions are built up and were they are nested. Yes, you can have your code all on one line, which is useful for script building places, but not for scripts created in Studio.
bl5eebryce
#63522421Monday, February 27, 2012 3:08 AM GMT

You don't have to but it makes it easier to read and look neater. Think of it as scripting etiquette.
kingkiller1000
#63522479Monday, February 27, 2012 3:10 AM GMT

As a rule of thumb, you tab the lines of code after each item that requires and end. This is not required, but people like to do it for two main reasons: 1) It makes the code more readable. 2) So you don't forget the ends. Here's an example: local x = 1 function PrintItem() ­ ­ ­ ­ print(x) ­ ­ ­ ­ x = x + 1 ­ ­ ­ ­ ­if x == 5 then ­ ­ ­ ­ ­ ­ x = 1 ­ ­ end end
kingkiller1000
#63522521Monday, February 27, 2012 3:10 AM GMT

And of course, it all collapses again -_-     local x = 1     function PrintItem()        print(x)        x = x + 1        if x == 5 then           x = 1        end     end
2tallhank
#63524895Monday, February 27, 2012 3:57 AM GMT

[ Content Deleted ]
epicfail22
#63524917Monday, February 27, 2012 3:58 AM GMT

Y U NO TAB IN ON if's not prints()'s.
2tallhank
#63524998Monday, February 27, 2012 4:00 AM GMT

[ Content Deleted ]
stravant
Forum Moderator
#63528092Monday, February 27, 2012 5:46 AM GMT

It's when you hit the key that says `tab` on your keyboard, it's sort of like a space but more powerful in what it can be used for. In general it's used to format blocks of related stuff. Back in the old days you would use tabs to help format your documents, but now they're mainly just used in code because programs like word will do that for you these days. The advantage of using tabs over spaces is that each person can set how wide a space each tab represents to fit their liking (for instance in Roblox you can do this in the studio settings), without having to edit the actual code. In the code the tabbing makes it much easier to see what code belongs to each if statement and function etc, and makes it immediately obvious when an end is missing from one of the blocks in the code.
CloneTrooper1019
#63532585Monday, February 27, 2012 1:22 PM GMT

stravant has won this post again.
epicfail22
#63547664Monday, February 27, 2012 10:39 PM GMT

@stravant; Didn't know you could change tab space in settings. So changing that. Why do you start foruming now and not on xLEGOx?
kingkiller1000
#63550240Monday, February 27, 2012 11:25 PM GMT

xLEGOx's profile was swapped with Stravant's.
unholysoda
#63550243Monday, February 27, 2012 11:25 PM GMT

@epicfail22 Idk y he started forming, but he got a name chabge from xlegox to starvent, becasue he is now a moderator, and there couldnt be "lego" in his name.
kingkiller1000
#63550274Monday, February 27, 2012 11:26 PM GMT

What I find funny is that he was a forumer on xLEGOx.
kingkiller1000
#63550308Monday, February 27, 2012 11:26 PM GMT

*Moderator
epicfail22
#63555005Tuesday, February 28, 2012 12:45 AM GMT

Yeah I knew that. I just never saw him on the forums when he was xLEGOx, and now I do when he's stravant.

    of     1