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 » Scripting Helpers
Home Search
 

Re: So what's the point of semicolons?

Previous Thread :: Next Thread 
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
21 May 2014 11:42 PM
I wanna start using them, but I wanna know what they do first?
Report Abuse
PurelyRandom is not online. PurelyRandom
Joined: 05 Mar 2011
Total Posts: 36763
21 May 2014 11:44 PM
If you don't know how to use them and it's something as small as a semicolon, it's probably not worth using them to complicate your scripts.

Just keep going on without them until they're necessary.
Report Abuse
KOTwarrior is not online. KOTwarrior
Joined: 13 Jun 2012
Total Posts: 4376
21 May 2014 11:45 PM
Semicolons tend to be used to close lines as long as they don't open a sub-class. There are other uses, more conventional.

this is a signature: pcall(function() print([[apparently this is a string]]) end)
Report Abuse
uyoyalt is not online. uyoyalt
Joined: 16 Apr 2013
Total Posts: 2860
21 May 2014 11:52 PM
a = {
[b] = "a";
[c] = "p"
}
Report Abuse
Foxconn is not online. Foxconn
Joined: 20 Feb 2011
Total Posts: 275
22 May 2014 12:26 AM
I use them for marking a new line

ie:

script.Parent.Value = 0;script.Parent.Value = 50
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
22 May 2014 12:39 AM
In Lua they are generally unnecessary and are usually ignored. They can be used instead of commas in tables and they can be used to end lines of code, but they're ignored in that case.

In other languages, like Java, they're necessary. They tell the compiler that the current statement is finished running.

-[::ƧѡÎḾḠΰῩ::]-[::Helper of Scripting and Writer of Wikis::]
Report Abuse
Wreckerbuster67 is not online. Wreckerbuster67
Joined: 29 Jul 2012
Total Posts: 1144
22 May 2014 01:49 AM
Can be used as an alternative for commas in tables.
Can be used to fit multiple lines into one.
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
22 May 2014 02:11 AM
They're not needed in Lua, but languages like Java they're used.

Usually the ones who use semicolons in Lua, learned other languages first.
Report Abuse
Divyesh is not online. Divyesh
Joined: 25 Mar 2010
Total Posts: 958
22 May 2014 05:28 AM
I assume they added semicolons so it would be easier for java developers to organize their lua code in the same way they do java.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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