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: What are your RBX.Lua "pet peeves"?

Previous Thread :: Next Thread 
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
16 Jan 2012 08:09 PM
1) When I see someone use "game.Players:GetChildren()"
2) People using camelCase methods
3) People using Remove() instead of Destroy()
4) Not spacing operators and equal signs. i.e, "1+1=2"

I probably have a lot more, but those are just the ones I though of off the top of my head.
Report Abuse
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
16 Jan 2012 08:09 PM
Errr...I'm probably late, but whats Destroy, and what is wrong with Remove?
Also, camelCase is FTW.
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
16 Jan 2012 08:09 PM
Oh, forgot a big one.

5) People who say LUA
Report Abuse
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
16 Jan 2012 08:11 PM
^This. Also, lua.
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
16 Jan 2012 08:12 PM
I don't feel like explaining Destroy() vs. Remove(). Just remember that Destroy() is way better and use it instead of Remove() wherever possible.
Report Abuse
games is not online. games
Joined: 24 Apr 2007
Total Posts: 22
16 Jan 2012 08:14 PM
I also program in LUA
Report Abuse
Legend26 is not online. Legend26
Joined: 08 Sep 2008
Total Posts: 10586
16 Jan 2012 08:14 PM
Naming inconsistencies.
Report Abuse
Cyrok is not online. Cyrok
Joined: 11 Jan 2012
Total Posts: 630
16 Jan 2012 08:21 PM
I have all of yours, blockoo, and more.

1) When I see someone use "game.Players:GetChildren()".
2) People using camelCase methods.
3) People using Remove() instead of Destroy().
4) Not spacing operators and equal signs. i.e, "1+1=2".
5) Not tabbing your code after every function, if/then, do keyword.
6) When people put all their ends on one line ("end end end").
7) People who use PascalCase for things like their variables and custom functions (FindPlayer).
8) People who have *horribly* inefficient code (I'm okay with 'normal' inefficient code, but when there's forty lines of changing a brick's transparency, it gets ridiculous).

And I have more, I just don't fell like listing them.

{ Have any broken code that needs fixing? Send me a message and maybe I can assist you. }
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
16 Jan 2012 08:23 PM
I share #6 with you.
Report Abuse
mew903 is not online. mew903
Joined: 03 Aug 2008
Total Posts: 22071
16 Jan 2012 08:24 PM
When people use "if" trees, like

if then
if then
if then
if then
if then
if then
if then
if then
end
end
end
end
end
end
end
end
Report Abuse
Quenty is not online. Quenty
Joined: 03 Sep 2009
Total Posts: 9316
16 Jan 2012 08:25 PM
Everything but #6, along with stuff like

~=, I use 'not'

People who define stuff like

x = game.Workspace:GetChildren()

for i, v in pairs(x) do

end

Or people who use for i=1, #x do

Or people who use i, v, I like a, b, but I understand i, v is technically correct somehow.

Also, horrible inefficiencies in code.
Report Abuse
Cyrok is not online. Cyrok
Joined: 11 Jan 2012
Total Posts: 630
16 Jan 2012 08:25 PM
And I have this... habit. When someone has a PascalCase variable in their code (or sometimes even a single word variable) when I'm foruming in Scripting Helpers, I'll go through and change all of their variables to camelCase, and sometimes even rewrite their code.

{ Have any broken code that needs fixing? Send me a message and maybe I can assist you. }
Report Abuse
Sorcus is not online. Sorcus
Forum Moderator
Joined: 29 Nov 2010
Total Posts: 3775
16 Jan 2012 08:25 PM
I use game.Players:GetChildren() all the time.

~Sorcus
Report Abuse
Cyrok is not online. Cyrok
Joined: 11 Jan 2012
Total Posts: 630
16 Jan 2012 08:26 PM
@Quenty

I occasionally do this (and by occasionally, I mean all the time):

    x = game.Workspace:GetChildren()
    for i, v in pairs(x) do
    end

{ Have any broken code that needs fixing? Send me a message and maybe I can assist you. }
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
16 Jan 2012 08:28 PM
Mine are:
1) No indents for not-small scripts.
If I'm just testing something really quick, I won't tab, but anything longer than like 20 lines HAS to be indented.

2) Having unnecessary if-then's.
if plr then
if plr.Character then
if plr.Character.Humanoid then
--You get the idea.

3) Not using loops for stuff that needs loops. Like the 40 lines of transparency changing...

I can't really think of any more.

-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]-
Report Abuse
Quenty is not online. Quenty
Joined: 03 Sep 2009
Total Posts: 9316
16 Jan 2012 08:30 PM
My really big one is if the script is longer then 500 or so lines, I'll HAVE to define all the variables at the top, then functions, then execute everything at the bottom.
Report Abuse
Cyrok is not online. Cyrok
Joined: 11 Jan 2012
Total Posts: 630
16 Jan 2012 08:34 PM
I'm starting to believe that I have that one mental illness where everything has to be perfect. Like, if a picture frame is off by one degrees of an angle, you'll walk up to it and adjust it, or count out five hundred pencils precisely (for whatever reason). I can't remember the name of it, but I think I have it for my whole camelCase variable/function issue.

{ Have any broken code that needs fixing? Send me a message and maybe I can assist you. }
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
16 Jan 2012 08:36 PM
@Cyrok

OCD. We all have a little OCD in us. I get upset when the blinker in my car doesn't match the beat of the music I'm listening to :P

-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]-
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
16 Jan 2012 08:38 PM
@Cyrok
It's OCD (obsessive-compulsive disorder), and I have it too.
Report Abuse
GigsD4X is online. GigsD4X
Joined: 06 Jun 2008
Total Posts: 3794
16 Jan 2012 08:39 PM
Not using spaces between operators, using semicolons :c
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
16 Jan 2012 08:39 PM
I get annoyed when there's a car in front of me at a stoplight in a turn lane, and their blinker isn't in sync with mine.
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
16 Jan 2012 08:39 PM
My Pseudo-OCD kicks in whenever something goes wrong musically. Any sort of musical anomaly will make me feel stressed. Like when we played a song in band and we played the same thing over and over for like 4 minutes and the other trumpets got ahead by like 1/4th of a beat, I wanted to scream :P

-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]-
Report Abuse
smurf279 is not online. smurf279
Joined: 15 Mar 2010
Total Posts: 6871
16 Jan 2012 08:40 PM
When I see this:
----
Children = Workspace:GetChildren()

for index = 1, #Children do
print(Children[index])
end
----

Unnecessarily long Variable names and most importantly using the numeric for to iterate through tables instead of the generic for
Report Abuse
Cyrok is not online. Cyrok
Joined: 11 Jan 2012
Total Posts: 630
16 Jan 2012 08:41 PM
@Gigs

Semicolons don't bother me much. I like them when they're used in multi-line tables, it makes them look nicer.

    local nameList = {
        ["Cyrok"] = true;
        ["blockoo"] = true;
        ["AgentFireFox"] = false
    }

But when they're used otherwise, I'm indifferent.

{ Have any broken code that needs fixing? Send me a message and maybe I can assist you. }
Report Abuse
Cyrok is not online. Cyrok
Joined: 11 Jan 2012
Total Posts: 630
16 Jan 2012 08:42 PM
@smurf

Because of my OCD, I would make them longer.

local workspaceChildren = game:GetService("Workspace"):GetChildren()

Oh, and for some reason, I use GetService on every service I attempt to access, no matter which one it is.

{ Have any broken code that needs fixing? Send me a message and maybe I can assist you. }
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