|
| 21 May 2014 11:42 PM |
| I wanna start using them, but I wanna know what they do first? |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| Joined: 16 Apr 2013 |
| Total Posts: 2860 |
|
|
| 21 May 2014 11:52 PM |
a = { [b] = "a"; [c] = "p" }
|
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|