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
 

Good scripting Habits

Previous Thread :: Next Thread 
ggfunny1234 is not online. ggfunny1234
Joined: 09 Jul 2010
Total Posts: 3432
19 Mar 2012 03:11 PM
I prefer using 0.1, 0.2, etc.

It just bugs me if I don't, in which case I waste time going back and changing it to appease my OCD brain.
Report Abuse
RA2lover is not online. RA2lover
Joined: 09 Nov 2008
Total Posts: 1254
19 Mar 2012 03:12 PM
i haven't really tried at all, but i think i'm supposed to upload a script to roblox and using its id for the linkedsource property.

it would probably allow me to do stuff like reversible bans and such(still manually set-.-)
Report Abuse
bozothekiller01 is not online. bozothekiller01
Joined: 09 Mar 2011
Total Posts: 222
19 Mar 2012 03:12 PM
i use 0.1 or 00.1 ,just toi verify i have codeblocks working for the sentamatic climax's of the code injector/linker.
Report Abuse
Ozzypig is not online. Ozzypig
Joined: 27 Mar 2008
Total Posts: 4906
19 Mar 2012 03:13 PM
Think of it this way: for every zero you're putting in, you're adding another 8 bits to the length of your code. Eight whole bits. That's a monstrosity!
Report Abuse
RA2lover is not online. RA2lover
Joined: 09 Nov 2008
Total Posts: 1254
19 Mar 2012 03:16 PM
Think of it this way: every player has 4.5 megabytes avaiable for data persistance. 4.5 megabytes.
That's a monstrosity!
Report Abuse
Xcelbug is not online. Xcelbug
Joined: 24 Dec 2011
Total Posts: 1
19 Mar 2012 03:30 PM
I make sure my code explains itself rather than placing comments everywhere.
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
19 Mar 2012 03:57 PM
Use 1/10, not 0.1!

Nah, kidding.
Report Abuse
vexStudio is not online. vexStudio
Joined: 18 Mar 2012
Total Posts: 55
19 Mar 2012 04:38 PM
@Ozzypig

Adding in an unneeded zero may be eight extra bits, but think about comments.

{ Scripting level - intermediate. }
Report Abuse
Varp is not online. Varp
Joined: 18 Nov 2009
Total Posts: 5333
19 Mar 2012 04:41 PM
I don't frequently use Lua. That's how I write good code. :P

Although in Lua, I:
-Indent all blocks of code.
-Use local variables and functions
-Throw in the occasional semicolon.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
19 Mar 2012 05:18 PM
[ Content Deleted ]
Report Abuse
Quenty is not online. Quenty
Joined: 03 Sep 2009
Total Posts: 9316
19 Mar 2012 05:31 PM
I like your setup thing. Makes it easier to edit code structure / what operates. That does work, right?
Report Abuse
vexStudio is not online. vexStudio
Joined: 18 Mar 2012
Total Posts: 55
19 Mar 2012 05:36 PM
Some good coding habits (in (RBX.)Lua) I tend to use are as follows:

a. Indenting/tabbing new chunks.
b. Putting a zero in front of decimals below one (for instance: 0.5).
c. Using GetService whenever possible.
d. Utilizing anonymous functions whenever possible.

{ Scripting level - intermediate. }
Report Abuse
NinjaShadow1 is not online. NinjaShadow1
Joined: 03 Mar 2009
Total Posts: 2689
19 Mar 2012 05:36 PM
Wait, we can put a ; at the ends of lines in Lua? I didn't know that...
Report Abuse
NinjaShadow1 is not online. NinjaShadow1
Joined: 03 Mar 2009
Total Posts: 2689
19 Mar 2012 05:39 PM
Roblox REALLY needs auto-tabbing
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
19 Mar 2012 05:43 PM
[ Content Deleted ]
Report Abuse
Quenty is not online. Quenty
Joined: 03 Sep 2009
Total Posts: 9316
19 Mar 2012 05:49 PM
Wait, if you run:


print(x)(a or b)(c);

wouldn't that mean that print would return a function and then a or b would also return a function?

Otherwise, what is the point of saying:

(a or b)(c)

???
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
19 Mar 2012 06:03 PM
[ Content Deleted ]
Report Abuse
Quenty is not online. Quenty
Joined: 03 Sep 2009
Total Posts: 9316
19 Mar 2012 06:05 PM
So you dynamically create or destroy functions? As a data structure?

O_o
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
19 Mar 2012 06:09 PM
[ Content Deleted ]
Report Abuse
Quenty is not online. Quenty
Joined: 03 Sep 2009
Total Posts: 9316
19 Mar 2012 06:15 PM
Ahh. Fast coding. I guess ROBLOX is inefficient enough that only loops really create lag.
Report Abuse
Previous Thread :: Next Thread 
Page 2 of 2Go to page: 1, [2] Prev
 
 
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