nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 15 Aug 2011 07:04 PM |
I organize my code depending on the type of code it is. If I am going to be writing over 200 lines of code I put everything into tables and I also section out all my coding like so:
-- Localization local game = game; local workspace = workspace;
-- Functions Pong = { ["MoveFunction"] = function() stuff end, ["AnotherFunc"] = function() end, }
Ball = { ["Colors"] = stuff, ["Speed"] = othstuff, }
-- Initilization
while true do wait() Pong.MoveFunction() end
-- Connections
Stuff
-- Other Stuff to be added Stuff |
|
|
| Report Abuse |
|
|
| |
|
|
| 15 Aug 2011 07:13 PM |
I dont tab, I just type and hope it works
~ Mitch ~ |
|
|
| Report Abuse |
|
|
LocalChum
|
  |
| Joined: 04 Mar 2011 |
| Total Posts: 6906 |
|
|
| 15 Aug 2011 07:16 PM |
| YOU NEED TO TAB OR YOU DIE |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2011 07:17 PM |
I don't tab because I don't look at my code again because I don't make mistakes because I am perfect.
Giv y00r m0ni 2 fuol mi perf3kt |
|
|
| Report Abuse |
|
|
Raze
|
  |
| Joined: 18 Nov 2007 |
| Total Posts: 7905 |
|
|
| 15 Aug 2011 07:19 PM |
I don't tab it. I don't use enter.
I keep it going horizontally. No tabbing.. |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2011 07:20 PM |
I first declare my Varibles or Tags,Tables And other stuff. __________________________________________
settings = {
something = 56 ,
}
local poopoo = game:GetService("Workspace") local blah = blahvjdfkjtje6 _____________________________________________________ Then i write the Main Code (RESULTS MAY VARY) __________________________________________
function poopoo() print("NOOOOO") poopoo() end poopoo() _____________________________________________________ And the bottom is unknow __________________________________________
|
|
|
| Report Abuse |
|
|
|
| 15 Aug 2011 07:20 PM |
| I don't Tab but i do press enter to break up my code....Sometimes i don't. But that's when it's short and simple code. |
|
|
| Report Abuse |
|
|
Raze
|
  |
| Joined: 18 Nov 2007 |
| Total Posts: 7905 |
|
|
| 15 Aug 2011 07:22 PM |
function poopoo() print("NOOOOO") poopoo() end poopoo()
That looks so much better.
|
|
|
| Report Abuse |
|
|
|
| 15 Aug 2011 08:19 PM |
I only tab if I care. If it's something important and will take work, commence tabbing. If I'm just doing a quick test of something, no tabbage for me.
(°3°) Hai |
|
|
| Report Abuse |
|
|
rbxpri2
|
  |
| Joined: 14 Aug 2011 |
| Total Posts: 25 |
|
|
| 15 Aug 2011 08:54 PM |
| I never tab... It's a real pain to waste the time counting tabs to make it look pretty. I just don't mess up... I prefer separating my code into many short lines for readability. Then I can scan and find things quickly. |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2011 09:00 PM |
| I don't tab, I guess that means I'm going to die. |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2011 09:05 PM |
| Tabbing is a habit for me and it is easier for me. |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 15 Aug 2011 09:06 PM |
| Tabbing is a habit for me too. :O |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2011 09:18 PM |
| Tabbing makes reading and understanding it so much easier. You can tell what you need ends for and what ends end what sections of the script. |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2011 10:08 PM |
I write clean code naturally. It would be harder for me to write bad code than to write clean code.
Also, please, STOP CALLING IT TABBING. It's called INDENTING, not TABBING. X_X |
|
|
| Report Abuse |
|
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 15 Aug 2011 10:12 PM |
I tried to indent my work, but it doesn't work in the forums. I always indent the work, or Java would be horrible!
Anyway, I was talking about how you organize it and not "tabbing". q_q |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2011 10:13 PM |
Use alt+0160 to indent.
Two alt+0160s = a tab.
do print "Hello World" print(5+5) end |
|
|
| Report Abuse |
|
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 15 Aug 2011 10:15 PM |
@Julien
This laptop cannot perform alt codes... |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 15 Aug 2011 10:22 PM |
| I don't usually tab on roblox because of how annoying it is. With everything else I do. Also I always like to add in as many variables as I can at the beggining of the script to make for easier functionality and be able to change it so that it works exactly how I prefer it to. Then I just start writing the code, if there's any functions that need to be added, I'll add them under the variables then I'll also add in new variables if I find it helpful. |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2011 10:25 PM |
For me its just the order in which I think of it (I write meh code on whim, no actually thought process or planning, which causes longer than average debugging times and multiple updates when I think of new st00f to add)
So a lot of times, unless I am using a previous script as a template, its a jumbled mess with annotations everywhere explaining blocks of code to myself so I don't have to read through it all again to figure out what to update or where to add something
|
|
|
| Report Abuse |
|
|
|
| 15 Aug 2011 10:33 PM |
| I just hit my keyboard until the code does something...then I leave it like that. |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2011 12:27 AM |
| @Donny that's EXACTLY what i do :P |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
|
| 16 Aug 2011 05:27 AM |
@Oysi
You're close to rediscovering Microsoft's TRIPLE COMMENT (dun dun dun)
You have to do this:
---NAME OF FUNCTION ---DESCRIPTION ---OF ---FUNCTION ---Arg1: teh haxx ---Arg2: olol |
|
|
| Report Abuse |
|
|