Strange javascript Script errors

 From:  Michael Gibson
5772.2 In reply to 5772.1 
Hi Brian, the #include statement is not actually part of regular JavaScript, it's something that MoI itself expands in place by scanning through the script code, and MoI's scanner is not a full fledged parser that handles comment characters itself.

So because of that if you put something like

/*
#include xxxx
*/

the include will still expand in place since MoI's "include expander" still finds that one line that says #include, it doesn't handle the comments around it so it doesn't know that it's not supposed to be processed. When you put:

//#include xxxx

it should then stop that include expander / script preprocessor from finding it.

One of the sort of poorer areas of Javascript is that it doesn't natively handle things like including one file into another, so that's why Moi has a custom mechanism for it, and it's that custom mechanism that tripped you up in this case since the custom mechanism doesn't handle that kind of separate-line commenting out.

Hope that helps explain what you were seeing here.

- Michael