generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Is It a Bad Thing That I Write My Code Like This...

Previous Thread :: Next Thread 
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
30 Aug 2011 03:14 PM
I don't use spaces when dealing with '*, -, =, =" symbols, and I don't use spaces after a comma.

Basically, I don't really space things out. Is this a bad habit? Or should I just get into using spaces?
Report Abuse
cymru72 is not online. cymru72
Joined: 26 Jan 2008
Total Posts: 4362
30 Aug 2011 03:15 PM
Not really bad, I like to have tabbed, tidy code :3
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
30 Aug 2011 03:16 PM
Yeah, I always tab, my code is often neat, but I usually, if not always see people use spaces.
Report Abuse
trappingnoobs is not online. trappingnoobs
Joined: 05 Oct 2008
Total Posts: 19100
30 Aug 2011 03:16 PM
You should space:

Before and after a - and + sign.
After a coma


/, *, ^, and % don't usually get given spaces because of order of operations - Plus an minus separate two pieces of maths.

Ex:

5*6 + 2*6

Will be the equivalent of

(5*6) + (2*6)

So it's easier to notice math errors.
Report Abuse
cymru72 is not online. cymru72
Joined: 26 Jan 2008
Total Posts: 4362
30 Aug 2011 03:19 PM
^ brah has a point
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
30 Aug 2011 03:24 PM
Why not

(#)+(#)?
Report Abuse
LocalChum is not online. LocalChum
Joined: 04 Mar 2011
Total Posts: 6906
30 Aug 2011 03:25 PM
I tab

Sometimes I don't put spaces when defining/comparing

Eg:

if (true==false) then end-- non-spaced
if (true == false) then end -- spaced
OYUS93=true -- non-spaced
OYUS93 = true -- spaced
Report Abuse
owen0202 is not online. owen0202
Joined: 27 Feb 2008
Total Posts: 6912
30 Aug 2011 03:29 PM
Nospaces please.

a=1
b=a+1
c=b*2
Report Abuse
Aaaboy97 is not online. Aaaboy97
Joined: 05 Apr 2009
Total Posts: 6612
30 Aug 2011 03:33 PM
a = 1
b = a + 1
c = b*2
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
30 Aug 2011 03:35 PM
No spaces look ugly.
I put as many spaces as possible, sometimes two spaces instead of one, to help break it up (so that you get the similar features trapping was talking about).
Only in complex code, though, if it's something simple like what trapping said I do it like that.
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
30 Aug 2011 03:40 PM
I don't use spaces when minifying
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
30 Aug 2011 04:31 PM
I don't like using spaces because
1; I'm used to not spacing.
2; It's a hassle.
Report Abuse
owen0202 is not online. owen0202
Joined: 27 Feb 2008
Total Posts: 6912
30 Aug 2011 05:47 PM
nospaces r pro, i fink spaces r ugly
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
30 Aug 2011 05:48 PM
I don't use spaces on assigning/mathing/checking table values, but I use spaces everywhere else.
Report Abuse
IHurtPeople is not online. IHurtPeople
Joined: 02 Aug 2011
Total Posts: 443
30 Aug 2011 05:59 PM
me, always spaces after a comma

Only time I use spaces in maths is around addition and subtraction unless it's a complex statement or in a function (i.e. math.floor(a+0.5))

Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
30 Aug 2011 06:15 PM
I never use a space after a comma, it just looks ugly.

Eg;

Vector3.new(0,0,0)
Instance.new("Part",workspace)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image