Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-31-2007, 04:39 AM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
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.
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote
  #2  
Old 08-06-2007, 03:07 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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