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: Your style of coding!

Previous Thread :: Next Thread 
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
18 Sep 2015 08:39 PM
How do you format your code in roblox?
wat makes u unique??

Do you use semi-colons at the end of each line?
Do you make a function like this:

function test()
print()
end

or this:

test = function()
print()
end

Do you name variables like this:
local helloWorld = "hi"
or:
local HelloWorld = "hi"

do you comment like this:
--//comment
or this:
--comment

do you use single quotes or double quotes for strings? (or even brackets if ur rly fancy)

little stuff that really doesn't have an effect on the function of the code but makes u cool

any particular structures for ur code?

i thought i'd attempt to start a conversation or something since scripters has a lot of weird threds rn

while true do ur mom
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
18 Sep 2015 08:42 PM
local test = function()
print()
end

-- Comment

local HelloWorld = "Hi"

if (condition) then

end

Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
18 Sep 2015 08:45 PM
you can also be kreative and show ur other uniquenesses
not just restricted to my examples

also, do u use next, pairs, ipairs, etc for traversing tables?
pls dont fite about the efficiency


while true do ur mom
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
18 Sep 2015 08:47 PM
local tab = { }

for index = 1, 100 do

end

for index, value


Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
18 Sep 2015 08:48 PM
i alternate

sometimes i do like

changetext
ChangeText
changeText

cause im indecisive

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
morash is not online. morash
Joined: 22 May 2010
Total Posts: 5834
18 Sep 2015 08:49 PM
"you can also be kreative and show ur other uniquenesses"

~Guy copying me copying eLunate.
Report Abuse
ElectricShocker333 is not online. ElectricShocker333
Joined: 12 Oct 2011
Total Posts: 5
18 Sep 2015 08:49 PM
function test()
print()
end

local helloWorld = "hi"

--comment

One quote
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
18 Sep 2015 08:50 PM
some people captalize constants and stuff.
Report Abuse
FOXmcloud021 is not online. FOXmcloud021
Joined: 14 Apr 2012
Total Posts: 3512
18 Sep 2015 08:53 PM
http://pastebin.com/x50JS6w3




Bond with me siggy
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
18 Sep 2015 08:54 PM
print("one" .. "two")

(0, 0, 0)

Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
18 Sep 2015 08:54 PM
http://pastebin.com/AFt4xz7S

this is how i do it

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
dennis96411 is not online. dennis96411
Joined: 06 Mar 2009
Total Posts: 1079
18 Sep 2015 08:55 PM
I use exclusively CamelCase.
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
18 Sep 2015 08:56 PM
1. No


2. Depends if I make it local or not.

local:
local function name() end
global:
name = function() end


3. I have phases. Sometimes it's Hello_World and somethings it's helloworld, etc.


4. More phases.


5. Double for everything but calling functions:
a = "strr"
print'helloWorld'


In general my structure is nonexistent and I end up rewriting everything 10 times. I don't use the roblox studio script editor to write codes, instead I use Atom because it's OP af.


Muad'Dib
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
18 Sep 2015 08:59 PM
function test()
print()
end

--comment

local helloWorld = 1

print("hi")

for i,v in next, t do
print(i,v)
end


while true do ur mom
Report Abuse
Xsitsu is online. Xsitsu
Joined: 28 Jul 2009
Total Posts: 2921
18 Sep 2015 08:59 PM
http://pastebin.com/7GEGczBf
Report Abuse
Xsitsu is online. Xsitsu
Joined: 28 Jul 2009
Total Posts: 2921
18 Sep 2015 09:01 PM
In addition to my post, I forgot to add that I also do this:

local Players = game:GetService('Players')
local UserInputService = game:GetService('UserInputService')
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
18 Sep 2015 09:01 PM
ew one of those people who does getservice players

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
18 Sep 2015 09:09 PM
I do GetService
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
18 Sep 2015 09:09 PM
they're multiplying

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
Xsitsu is online. Xsitsu
Joined: 28 Jul 2009
Total Posts: 2921
18 Sep 2015 09:13 PM
I guess if you're just making simple, not so well organized scripts it's okay to do game.Players.PlayerName.Whatever, but I personally like to create variables for all game services I use at the top of my scripts and put them in one block of code.
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
18 Sep 2015 09:15 PM
What's so bad about GetService?
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
18 Sep 2015 09:15 PM
idk lol

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
18 Sep 2015 09:16 PM
i think it's slightly more efficient


while true do ur mom
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
18 Sep 2015 09:16 PM
like
VERRRRRRRRY slightly

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
CaptainGector is not online. CaptainGector
Joined: 02 May 2014
Total Posts: 487
18 Sep 2015 09:17 PM
Me? I'm not any expert but I prefer these styles:

-- Comments

function helloWorld()
print("helloWorld")
end

I don't use semicolons... But I am learning C++ so I might xD
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