View Single Post
  #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