PDA

View Full Version : Gscript2 and comments


Skyld
02-14-2005, 06:58 PM
I do not know if /* */ style comments are supposed to work with Gscript2 enabled, but they do not correctly. Or even if it is just because I am using the comments twice, I am not sure. I do not believe I have ever had a problem with this before.

Script of weapon -Rudora-System added/updated.
Script compiler output for -Rudora-System:
error: unexpected symbol && at line 302: }/* elseif !strequals(#s(serverr.season),summer) /*&& isonmap*/ && strequals(#s(clientr.setup-weather),off)) {

Any ideas, or if this could be fixed?

Doahh_p2p
02-14-2005, 07:08 PM
I do not know if /* */ style comments are supposed to work with Gscript2 enabled, but they do not correctly. Or even if it is just because I am using the comments twice, I am not sure. I do not believe I have ever had a problem with this before.



Any ideas, or if this could be fixed?

I think they cannot be used inside eachother so if you change /*&& isonmap*/ to '&& isonmap' it should be fine

The one after isonmap*/ is probably stopping both

Skyld
02-14-2005, 07:10 PM
I thought this too, but I did not realise that they did conflict.

Lance
02-14-2005, 08:21 PM
The text between the first /* until the first */ should be considered a comma, no...?

Ibonic
02-14-2005, 09:04 PM
Yes, anything between /* and */ is considered a comment, so your second /* should have no affect.

Skyld
02-14-2005, 09:14 PM
Obviously, it just seems to parse up to the first one.
I guess I just never noticed it before. :P

Admins
02-15-2005, 01:09 AM
In come C++ compilers you can have multiple nesting of comments, like /* /* /* */ */ */, which is required for making it possible to comment out includes and such stuff, but in Graal it is different