Jump to content

Problem with a bit of code


Fantasy

Recommended Posts

Well, I managed to run into a problem that I certainly didn't expect when I coded up a few chains. I tried to compile them just as a check, and was utterly surprised when something went wrong.

 

It's been a while since I last coded some things, and it *is* rather warm, so perhaps I'm missing something very silly, but I honesty don't know what.

 

According to WeiDu, there's a problem with this line:

 

 == R_MadaJ IF ~!Alignment("R_Madano",NEUTRAL_EVIL)~ THEN ~Unimportant blah blah.~

 

With R_Madano being the death value and R_MadaJ his dialogue file, of course. It's part of a normal chain, nothing strange with that as far as I know, and Weidu doesn't have a problem with the previous lines.

 

Strange thing is, before it reports this problem:

 

[C:\Spelen\BG2\/data/Default.bif] 5847739 bytes, 444 files, 0 tilesets

[ALIGN.IDS] parsed

WARNING: cannot verify trigger ~!Alignment("R_Madano",NEUTRAL_EVIL)~: Failure("lexing: empty token")

WARNING: cannot verify trigger ~!Alignment("R_Madano",NEUTRAL_EVIL)~: Failure("lexing: empty token")

[./override/ACTION.IDS] loaded, 13073 bytes

[ACTION.IDS] parsed

[./override/OBJECT.IDS] loaded, 1735 bytes

[OBJECT.IDS] parsed

 

[Madano\Test.d] PARSE ERROR at line 66 column 16-16

Near Text: !

syntax error

 

[Madano\Test.d]  ERROR at line 66 column 16-16

Near Text: !

Parsing.Parse_error

ERROR: parsing [Madano\Test.d]: Parsing.Parse_error

ERROR: compiling [Madano\Test.d]!

Stopping installation because of error.

 

It compiles another chain with *exactly* the same line without stopping the installation. The character file is installed before the dialogue one, so the character and his info are already in the override, so I don't think that can be the problem.

 

I suppose I could probably go around it by using OR and then checking for good or neutral, but I have the nagging feeling it should be possible to do it this way. Oh, and changing it to the MASK variation doesn't make a difference... could it be that !Alignment is simply not allowed? :)

Link to comment

That line looks fine to me. So my stab in the dark here is that you've missed a tilde on the previous line. Therefore it's getting confused and thinking your opening tilde just before the !Alignment is actually the closing tilde of the previous line.

Link to comment

Oh my... forgot a tilde... :D

 

Sorry to have troubled you all with this... perhaps it's a good idea if I *don't* try to code things when it's too warm to think and they cancel walking contests because people got killed because of the heat. ;)

 

Now if you'll excuse me, I think I'm going to see if I made the same mistake somewhere else, as well. :)

 

And thanks for the quick help, I really appriciate it. :D

Link to comment

Archived

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

×
×
  • Create New...