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 |
|
|
|
| 18 Sep 2015 08:42 PM |
local test = function() print() end
-- Comment
local HelloWorld = "Hi"
if (condition) then
end
|
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 18 Sep 2015 08:47 PM |
local tab = { }
for index = 1, 100 do
end
for index, value
|
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
|
| 18 Sep 2015 08:49 PM |
function test() print() end
local helloWorld = "hi"
--comment
One quote |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2015 08:50 PM |
| some people captalize constants and stuff. |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2015 08:53 PM |
http://pastebin.com/x50JS6w3
Bond with me siggy |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2015 08:54 PM |
print("one" .. "two")
(0, 0, 0)
|
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 18 Sep 2015 08:55 PM |
| I use exclusively CamelCase. |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| Joined: 28 Jul 2009 |
| Total Posts: 2921 |
|
|
| 18 Sep 2015 08:59 PM |
| http://pastebin.com/7GEGczBf |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
| |
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 18 Sep 2015 09:09 PM |
they're multiplying
➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 18 Sep 2015 09:15 PM |
| What's so bad about GetService? |
|
|
| Report Abuse |
|
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 18 Sep 2015 09:15 PM |
idk lol
➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 18 Sep 2015 09:16 PM |
like VERRRRRRRRY slightly
➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|