of     2   
chevron_rightchevron_rightchevron_right

Meelo
#8217033Monday, May 04, 2009 10:04 PM GMT

Does anyone know a reason for the following things to highlight? "#" at the beginning of the script highlights green. I attempted to use the "#define" preprocessor directive from C++ with this, but it didn't work "$" at the start of a line highlights red. I attempted to use the "var $name" syntax from PHP (And I also tried it with local instead of var), but it didn't work. There's probably more, but I only found these.
DingDong272
Top 100 Poster
#8217139Monday, May 04, 2009 10:06 PM GMT

I think the '#' may come from the C++ used to create the ROBLOX Application. I have no clue about the php '$,' though.
Meelo
#8217211Monday, May 04, 2009 10:07 PM GMT

I think php uses "var $" to declare a variable and it can be used in strings like: var $a = "No"; echo "$a blah"; Now I'm no expert on PHP, but I think this would echo "No blah"
XlegoX
#8217358Monday, May 04, 2009 10:10 PM GMT

Well, they certainly have no use in Lua syntax, and I doubt that Roblox did any modifications to the Lua interpreter. It's probably just remenants from the component that they used to make the script editor.
DingDong272
Top 100 Poster
#8217384Monday, May 04, 2009 10:10 PM GMT

I just learned PHP and all you need is a $ sign. $hi = "Hello"; echo $hi; > Hello $Hi = "Jack"; echo "$Hi and Jill went up the hill"; > Jack and Jill went up the hill
MrDoomBringer
Top 100 Poster
#8217481Monday, May 04, 2009 10:12 PM GMT

$ Is a special character in Lua. #, if I remember correctly, will create a comment.
XlegoX
#8217598Monday, May 04, 2009 10:14 PM GMT

Well, in the way they're highlighted they don't have a use, they only work at the start of lines.
DingDong272
Top 100 Poster
#8217604Monday, May 04, 2009 10:14 PM GMT

Doesn't appear to make comments to me. Here's the error: "unexpected symbol near '#'" Just got that error.
MrDoomBringer
Top 100 Poster
#8217644Monday, May 04, 2009 10:15 PM GMT

Ah, never mind then. They are special characters used for different things.
XlegoX
#8217696Monday, May 04, 2009 10:15 PM GMT

I wonder what would happen if you defined "a" as a table globaly, and pasted in a script "#a", no... Any way of using "#" as an LValue?
DingDong272
Top 100 Poster
#8217737Monday, May 04, 2009 10:16 PM GMT

_G.a = { #a } Like that?
level140roblox
#8217790Monday, May 04, 2009 10:17 PM GMT

That would just be _G.a = {1}
Meelo
#8217962Monday, May 04, 2009 10:20 PM GMT

Oh wait - #a is the same as getmetatable(a). Errr... I forget the meta event that is called... anyone have a complete list of them?
XlegoX
#8217970Monday, May 04, 2009 10:21 PM GMT

Nah, you can't use # as an LValue... Maybey the devs were originaly planning of using a different language than Lua that did use them...?
level140roblox
#8218076Monday, May 04, 2009 10:22 PM GMT

Left over from xhtml?
Meelo
#8218157Monday, May 04, 2009 10:23 PM GMT

Anyways, it only highlights if it's the first character in the script - I mean, that can't be intentional, can it?
DingDong272
Top 100 Poster
#8218231Monday, May 04, 2009 10:24 PM GMT

Let's see how many conspiracy theories about the true use of ROBLOX's Lua we can come up with.
earth100
#8218416Monday, May 04, 2009 10:27 PM GMT

Wierd. If "$" is the ONLY thing in the script Output says Workspace.Script:1: unexpected symbol near '$'
XJegoX
#13118319Thursday, August 20, 2009 5:23 AM GMT

BAWMPAMEELO
dsds2
#13121420Thursday, August 20, 2009 10:14 AM GMT

They probably just leaked over from Scintilla.
sncplay42
#13121865Thursday, August 20, 2009 11:05 AM GMT

Why are all these old threads being bumped?!
Dr01d3k4
#13121877Thursday, August 20, 2009 11:06 AM GMT

XJegoX is doing it snc.
sncplay42
#13122380Thursday, August 20, 2009 12:00 PM GMT

@Dr01d inorite? But why?
Dr01d3k4
#13122471Thursday, August 20, 2009 12:06 PM GMT

The wheels on the phailbus go round and round, round and round, the wheels on the phailbus go round and round, all day long until it gets a flat tire.
blocco
#13122559Thursday, August 20, 2009 12:09 PM GMT

On Notepad++ (My default editor), in Lua, the '#' in the first character in the script is green. Same with the red '$' in front of a line.

    of     2   
chevron_rightchevron_rightchevron_right