Jump to content

Dialogue Issue


Recommended Posts

This dialogue state:



SAY #20302

IF ~Alignment(Protagonist,MASK_EVIL)~ THEN REPLY @3 GOTO MGLaugh

IF ~~ THEN REPLY @2 DO ~Enemy()
					 TriggerActivation("ILLUSIONDOOR",TRUE)~ EXIT

END /* 4 */


returns a parsing error. The error is reported as a syntax error (location: the "IF ~" immediately following "SAY #20302").


What is causing this error? I'm just about ready to say "!@#$ it" and give up the project. I'm so tired of mysterious parsing errors and the near-useless WeiDU readme.


- D

Link to comment

I did a test compilation of the following using WeiDU v196, and it compiled properly, as in I got the message RESOURCE [_BIMOEN] NOT FOUND IN KEY or similar, because I was not using WeiDU in an actual game directory, but rather in a document directory that does not contain the game.


I put some text in so I could see the spacing better.




SAY ~Testing~

IF ~Alignment(Protagonist,MASK_EVIL)~ THEN REPLY ~TWIT~ GOTO MGLaugh

IF ~~ THEN REPLY ~DIE!~ DO ~Enemy()
					 TriggerActivation("ILLUSIONDOOR",TRUE)~ EXIT

END /* 4 */

Link to comment

If you use Crimson Editor, you might want to check out cmorgan's highlighting tool. By switching to check for strings, missing tildes really pop out at you.


I can't speak for anyone else, but missing tildes and END or EXIT lines account for 90% of the syntax errors I get.

Link to comment

This bit...

IF ~!InParty("Aerie")
!Dead("KalahIllusion") THEN BEGIN 3

SAY #20301


END /* 3 */

...is missing a tilde after the state trigger.


Edit: you can also leave out THEN and BEGIN if you wish. It can make it harder to read if you're not used to D code, but I like it for its compactness; it lets me focus better on the actual dialog code and less on the wrapper.


Edit again: Yes, WeiDU can be a bit dense when reporting errors. For me the line number it reports is often meaningless.

Link to comment

I hear ya. I recently downloaded Crimson but haven't had time to work with it yet. I ditched Notepad because it fragments long lines when word wrap is enabled (it inserts end of line characters instead of just wrapping the line). I have been using Word but I had to disable all of its character replacement options in order to maintain a straight text file. Ugh. At least it doesn't fragment long lines.

Link to comment

Hey, Wounded Lion, drop an email message to svowles at comcast dot net and I will send you the package I sent berelinde - it is even easier to use than the Development Wikki version, as everything is already named correctly - it is pretty much a drag and drop from .rar.


JCompton told me about this editor, and I now pretty much just use this one with highlighters, only droping into TextPad for regexp changes (newline, etc, stuff that Crimson doesn't support).


I like ConTEXT, but the highlighters bog down even on fast machines, while Crimson has had every single BG1 NPC file (a little over 1000 files) open, all highlighted, with little slowdown.

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...