Trump,
I just realized that if I increment/decrement the variable comment, I can support nested comments, so change the following lines from:
Code:
if (buffer[i] == '\n') line_num++;
if (buffer[i] == '/' && buffer[i+1] == '*') { comment = 1; }
if ((strrchr(charIn,buffer[i]) || quote) && !comment) {
temp[p] = buffer[i];
p++;
}
if (buffer[i] == '/' && buffer[i-1] == '*') { comment = 0; }
if (buffer[i] == '\"') {
to:
Code:
if (buffer[i] == '\n') line_num++;
if (buffer[i] == '/' && buffer[i+1] == '*') { comment++; } //MODIFY THIS LINE
if ((strrchr(charIn,buffer[i]) || quote) && !comment) {
temp[p] = buffer[i];
p++;
}
if (buffer[i] == '/' && buffer[i-1] == '*') { comment--; } //MODIFY THIS LINE
if (buffer[i] == '\"') {
Again, its in
void Parser::LoadScript(int npcid, const char *zone) around line 990 or so.
Regards,
krich