Thank you for posting a more complicated example.
Here is q.tra:
@354 = ~string 354~
@602 = ~"I do hope you enjoy a challenge, ." You get the feeling her words are more important than they seem.~
@603 = ~"C-challenge? Oh... oh, I hope not."~
@604 = ~"C-challenge? Oh... oh, me hope not."~
@605 = ~"Just so long as this isn't too rough, I should be okay."
@606 = ~"Me handle... some stuff. Me not handle lots, though."
@607 = ~"I have dealt with challenges before and can handle anything similar again."~
@608 = ~"Me no worry about challenge. Me done that before."~
@609 = ~"Nothing has challenged me thus far. I am ready for this."~
@610 = ~"Me no bat eyelid at other stuff. Me do this easy."~
@611 = ~"I doubt anything on the mortal plane could challenge me now."~
@612 = ~"My blood is Bhaal blood. Me no challenged by anything."~
Here is test.d:
BEGIN FOO
IF ~~ THEN BEGIN eAI
SAY @354 = @602
IF ~CheckStatGT(Player1,7,INT)~ THEN REPLY @603 DO
~SetGlobal("RtWMyDifficulty","GLOBAL",0)~ GOTO eAIDifficultySet
IF ~!CheckStatGT(Player1,7,INT)~ THEN REPLY @604 DO
~SetGlobal("RtWMyDifficulty","GLOBAL",0)~ GOTO eAIDifficultySet
IF ~CheckStatGT(Player1,7,INT)~ THEN REPLY @605 DO
~SetGlobal("RtWMyDifficulty","GLOBAL",1)~ GOTO eAIDifficultySet
IF ~!CheckStatGT(Player1,7,INT)~ THEN REPLY @606 DO
~SetGlobal("RtWMyDifficulty","GLOBAL",1)~ GOTO eAIDifficultySet
IF ~CheckStatGT(Player1,7,INT)~ THEN REPLY @607 DO
~SetGlobal("RtWMyDifficulty","GLOBAL",2)~ GOTO eAIDifficultySet
IF ~!CheckStatGT(Player1,7,INT)~ THEN REPLY @608 DO
~SetGlobal("RtWMyDifficulty","GLOBAL",2)~ GOTO eAIDifficultySet
IF ~CheckStatGT(Player1,7,INT)~ THEN REPLY @609 DO
~SetGlobal("RtWMyDifficulty","GLOBAL",3)~ GOTO eAIDifficultySet
IF ~!CheckStatGT(Player1,7,INT)~ THEN REPLY @610 DO
~SetGlobal("RtWMyDifficulty","GLOBAL",3)~ GOTO eAIDifficultySet
IF ~CheckStatGT(Player1,7,INT)~ THEN REPLY @611 DO
~SetGlobal("RtWMyDifficulty","GLOBAL",4)~ GOTO eAIDifficultySet
IF ~!CheckStatGT(Player1,7,INT)~ THEN REPLY @612 DO
~SetGlobal("RtWMyDifficulty","GLOBAL",4)~ GOTO eAIDifficultySet
END
Here is WeiDU's output:
[c:\src\weidu\weidu.asm.exe] WeiDU version 75
[C:\Program Files\Black Isle\BGII - SoA/chitin.key] loaded, 590551 bytes
[C:\Program Files\Black Isle\BGII - SoA/chitin.key] 182 BIFFs, 41793 resources
[C:\Program Files\Black Isle\BGII - SoA/dialog.tlk] loaded, 9649307 bytes
[C:\Program Files\Black Isle\BGII - SoA/dialog.tlk] 79991 string entries
[q.tra] parsed (11 translation strings)
[test.d] parsed
Adding FOO to internal list of available DLGs
ERROR: No translation provided for @606
ERROR: cannot resolve strings in FOO
ERROR: Cannot postprocess FOO
ERROR: problem processing D files: Not_found
ERROR: Not_found
This still looks right to me -- WeiDU notices that @606 is missing. Quitch, perhaps you could post (as attachments, or send to me via email) the complete D and TRA files *and* a clipboard cut-and-paste of the output that you get where WeiDU magically skips over this problem?
Oh, here's one possibility: maybe you are running this from inside a TP2 file *and* there is some other TRA file lying around that was loaded at the same time that defines a @606? The bug may be that TP2 processing is keeping some old TRA file around (which defines @606) when it should be dropping it, which masks the "missing @606" error. If so, I'd need to see your TP2 file and all of the TRA files to debug it properly.
I'm sorry that this is taking so long to nail down, but until I can reproduce it locally I can't really see the problem so I can't see how to fix it.