Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   Script comment bug (https://forums.graalonline.com/forums/showthread.php?t=75972)

Tolnaftate2004 07-31-2007 04:39 AM

Script comment bug
 
Under certain circumstances the script compiler will complain about an unexpected token (exactly what depends on the code).

PHP Code:

function onCreated() {
  
/*this.join("itemtype");
  
  temp.test = MUDitem("000001",3);
  //print_x(temp.test.xml,0);*/
}
... 

The compiler complains of an unexpected token " " on line 32 (the last line).

PHP Code:

function onCreated() {
  
/*this.join("itemtype");
  
  temp.test = MUDitem("000001",3); */
  //print_x(temp.test.xml,0);
}
... 

No error.

It seems the line comment is taking precedence over the multi-line comment, so the ending */ is ignored in this case. It may not be anything serious, but it certainly was irritating to look through a code that appears perfectly fine without a useful compiler error.

It gives a different unexpected token if other multi-line comments are found further down in the script.

Admins 08-06-2007 03:07 PM

A single-line comment can out-comment the */, this is not a bug though, but the syntax highlighter in the RC window is handling comments slightly different.


All times are GMT +2. The time now is 05:01 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.