|
FAQ
• Search • Login
|
|
Page 1 of 1
|
[ 6 posts ] |
|
Comment blocks do not work.
Author |
Message |
Yazuak
Joined: Mon Dec 20, 2010 6:52 pm Posts: 5
|
Comment blocks do not work.
I tried to comment out a section of my code with /* */ (which works in fine gmod's implementation of lua), but CC told me there was an "unexpected character near /"
Anyone else get this error? I hate having to comment out line by line.
|
Sun Dec 26, 2010 5:08 am |
|
|
zalo
Joined: Sat Feb 03, 2007 7:11 pm Posts: 1496
|
Re: Comment blocks do not work.
Since comments in .inis are //, I guess Data made them -- in Lua. I believe the way to do block comments is --[[ and ]]-- . This too: http://www.ozone3d.net/blogs/demoniak3d/?p=36
|
Sun Dec 26, 2010 5:30 am |
|
|
alphagamer774
Joined: Wed Feb 10, 2010 4:06 am Posts: 1294 Location: Comox, BC, Canada
|
Re: Comment blocks do not work.
In .ini you block comment like this
/* BLEHBLEHBLEH BLEHBLEHBLEH */
EDIT: OH ♥♥♥♥ I'M DUMB. Serves me right for not reading your post.
|
Sun Dec 26, 2010 5:53 am |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: Comment blocks do not work.
It works for me as Code: --[[ Comment here More comments Blah Blah --]]
|
Sun Dec 26, 2010 5:54 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Comment blocks do not work.
Standard lua block comments start with --[[ and are terminated by ]]. I think --]] is just used for syntactic cleanliness.
|
Sun Dec 26, 2010 7:06 am |
|
|
Petethegoat
Joined: Mon Jun 15, 2009 4:02 pm Posts: 905
|
Re: Comment blocks do not work.
Garry just added C style commenting because he preferred it to regular commenting in Lua.
|
Sun Dec 26, 2010 9:11 pm |
|
|
|
|
Page 1 of 1
|
[ 6 posts ] |
|
Who is online |
Users browsing this forum: No registered users |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|