error:
__DialogScripts.asc(129): Error (line 129): incorrectly terminated character constant
There is no dialogue script (probably internal); there's no information on the error; altering the changed dialogs (like removing their contents and then recompiling) gives me nothing; what the hell does this error mean? How do I solve it without looking through every lines of every one of my 50 dialogues searching for a double " at the end of a line?
Character constant is 'a' kind of thing that defines a single character.
"incorrectly terminated character constant" error is given if the constant has more than 1 characters between the quotes.
No idea why the dialog is not specified, but all the dialogs are compiled as a one big script, so counting lines starting with dialog ID 0 and down may help finding this line.
For example, if Dialog 0 has 50 lines, and Dialog 1 has 100 lines, then line 129 will be around line 79 of Dialog 1.
I've been able to replicate the error message with the dialogue,
// Dialog script file
@S // Dialog startup entry point
return
@1
int j = '55';
return
as well as with the line
int j = '';
But I wonder why the compiler can't pinpoint the error. Because if you put "int j = Holzschuh;" instead of "int j = '';", then the compiler will point out the exact dialogue and exact line and complain about an undefined symbol. So the compiler (specifically, the scanner part of it) might have a bug when processing the new section directives.
I've found the supposed line it's on (line 129 of dialogue 0 -- which I haven't recently changed), but even after commenting out the line, or just removing the entire dialogue text, the same error occurs. Could this be in a higher dialogue?
Nothing seems to be wrong with the line, and it hasn't changed since I wrote it in.
Also, there's no character constants anywhere.
Here's the somewhere-there's-an-error text:
127 cBuddhistCow.SayAtBubble(bc_talk_x,bc_talk_y,"&106 ...and they fought, spears and chains clashing against each other until the god Arktus was finally vanquished.");
128 cBuddhistCow.SayAtBubble(bc_talk_x,bc_talk_y,"&107 He changed quickly into a mountain-sized pile of dirt, and we name him now ''Moorardna'', or, ''the third mountain''.");
129 cBuddhistCow.SayAtBubble(bc_talk_x,bc_talk_y,"&108 After a time, it became the second age of Agnor, and pending a great flood - caused by the introduction of a new mountain -");
130 cBuddhistCow.SayAtBubble(bc_talk_x,bc_talk_y,"&109 he built a large boat and fit all of the animals on board.");
131 cBuddhistCow.SayAtBubble(bc_talk_x,bc_talk_y,"&110 Horses, cows, ducks and crows; deer and peacock and dog; and some which no longer exist, such as the monkey...");
Line-numbers are illustrative.
Is there any way that I could found out a log of the compile, more detailed errors, or the contents of __DialogScripts.asc?
Okay, found it - on a totally different line, in dialogue 57 (wtf?) -- a SayBubble contained two sets of Double Quotes in it, so it became a weird, improperly terminate string with 'Doctor' in the middle.
with Double Quote marks around ' "Doctor" Braun ':
cMainframe.SayAtBubble(mainframe_talk_x,mainframe_talk_y,"&36 Hahahahahahahaha! Oh yes -- *"Doctor"* Braun. What was it he was a doctor of? Dog-ology or something?");
...but was supposed to use two Single Quotes around ' ''Doctor'' Braun ' (the usual technique of hiding shitty delimiters):
cMainframe.SayAtBubble(mainframe_talk_x,mainframe_talk_y,"&36 Hahahahahahahaha! Oh yes -- *''Doctor''* Braun. What was it he was a doctor of? Dog-ology or something?");
Hard to see the difference; that's the last time I just copy+paste the tester's corrections off a giant spreadsheet :/
Had to wipe/refill every dialogue with recompile to find the one with the error.
Maybe the dialogs are compiled not in the order of IDs but in the order in the list, and you have reordered them in the project tree? Like had subfolders etc.
By the way, AFAIK, you may include double quotes in strings -- if you put a backslash right in front.
cMainframe.SayAtBubble(mainframe_talk_x,mainframe_talk_y,"&36 Hahahahahahahaha! Oh yes -- *\"Doctor\"* Braun. What was it he was a doctor of? Dog-ology or something?");
Aw man, I knew I'd forgotten something :P
CW - yes but 57 is not the highest or lowest ID, it isn't at the bottom or top of the dialog list/subfolders, etc....
It's a Mystery - with Father Revere.