Jump to content

CHAIN Problems


baldur46233

Recommended Posts

Hi everyone! :) I'm confused with one of my banters. I literally have no idea wha'ts wrong with it. Here's my dialogue:

 

BEGIN ~M#DraB.d~

 

CHAIN

 

IF ~InParty(“M#Dracoâ€)

 

InParty(“Minscâ€)

 

!ActuallyInCombat

 

Global(“M#DracoMinscâ€,â€GLOBALâ€,0)

 

THEN K#DraB DracoMinsc1

 

~(sneezes for the third time) Minsc, what is that furry animal you are carrying?~

 

DO ~SetGlobal(K#DracoMinscâ€,â€GLOBALâ€,1)

 

== BMINSC ~Oh! This is Boo! Boo meet Draco. Draco meet Boo.~

 

= Friend Draco? Boo wants to know, why you are sneezing so much and he also wants to know if there is a way to cure you.~

 

== M#DraB ~(sneezes once more) Please keep that animal away from me.~

 

= ~I think that is the best way to 'cure' me and tell Boo -- (sneeze)~

 

== BMINSC ~Alright then! Boo and I will remain far away from you until your disease ends. ~

 

EXIT

 

Here is my problem:

 

[Draco/M#DraB.d] LEXER ERROR at line 15 column 1-6

Near Text: (

Parsing.Parse_error

ERROR: parsing [Draco/M#Dra.d]: Parsing.Parse_error

ERROR: compiling Draco/M#DraB.d]!

Stopping installation because of error.

 

ERROR Installing [Draco for BG2:SoA], rolling back to previous state

Will uninstall 3 files for [sETUP-DRACO.TP2] component 0.

Uninstalled 3 files for [sETUP-DRACO.TP2] component 0.

ERROR: Parsing.Parse_error

 

So, can anyone help me out please?

Link to comment
BEGIN ~M#DraB.d~

 

CHAIN

IF ~InParty(“M#Dracoâ€)

InParty(“Minscâ€)

!ActuallyInCombat

Global(“M#DracoMinscâ€,â€GLOBALâ€,0)

THEN K#DraB DracoMinsc1

~(sneezes for the third time) Minsc, what is that furry animal you are carrying?~

DO ~SetGlobal(K#DracoMinscâ€,â€GLOBALâ€,1)

== BMINSC ~Oh! This is Boo! Boo meet Draco. Draco meet Boo.~

= Friend Draco? Boo wants to know, why you are sneezing so much and he also wants to know if there is a way to cure you.~

== M#DraB ~(sneezes once more) Please keep that animal away from me.~

= ~I think that is the best way to 'cure' me and tell Boo -- (sneeze)~

== BMINSC ~Alright then! Boo and I will remain far away from you until your disease ends. ~

EXIT

 

You should probably be using CombatCounter(0) and !See([ENEMY]) instead of !ActuallyInCombat, for a start. Second, you have M# as your prefix in one instance, and K# in two later instances, then M# again. Which one are you actually using? Also, the BMINSC and M#DraB need to have tildes around them, so it looks like: ~BMINSC~ instead. Also, for the character initiating the banter, InParty(Myself) is acceptable. Last, your DO should look like this: ~SetGlobal("K#DracoMinsc","GLOBAL",1)~ instead. You were missing a quotation mark and a tilde.

Link to comment
BEGIN ~M#DraB.d~

 

CHAIN

IF ~InParty(“M#Dracoâ€)

InParty(“Minscâ€)

!ActuallyInCombat

Global(“M#DracoMinscâ€,â€GLOBALâ€,0)

THEN K#DraB DracoMinsc1

~(sneezes for the third time) Minsc, what is that furry animal you are carrying?~

DO ~SetGlobal(K#DracoMinscâ€,â€GLOBALâ€,1)

== BMINSC ~Oh! This is Boo! Boo meet Draco. Draco meet Boo.~

= Friend Draco? Boo wants to know, why you are sneezing so much and he also wants to know if there is a way to cure you.~

== M#DraB ~(sneezes once more) Please keep that animal away from me.~

= ~I think that is the best way to 'cure' me and tell Boo -- (sneeze)~

== BMINSC ~Alright then! Boo and I will remain far away from you until your disease ends. ~

EXIT

 

You should probably be using CombatCounter(0) and !See([ENEMY]) instead of !ActuallyInCombat, for a start. Second, you have M# as your prefix in one instance, and K# in two later instances, then M# again. Which one are you actually using? Also, the BMINSC and M#DraB need to have tildes around them, so it looks like: ~BMINSC~ instead. Also, for the character initiating the banter, InParty(Myself) is acceptable. Last, your DO should look like this: ~SetGlobal("K#DracoMinsc","GLOBAL",1)~ instead. You were missing a quotation mark and a tilde.

 

Gahh..I had some pretty stupid mistakes there....and thanks :) but it still says I have an error...is this better? And what am I missing now?

 

BEGIN ~M#DraB.d~

 

CHAIN

 

IF ~InParty(“Myselfâ€)

 

InParty(“Minscâ€)

 

CombatCounter(0) !See([ENEMY])

 

Global(“M#DracoMinscâ€,â€GLOBALâ€,0)

 

THEN M#DraB DracoMinsc1

 

~(sneezes for the third time) Minsc, what is that furry animal you are carrying?~

 

DO ~SetGlobal("M#DracoMinsc","GLOBAL",1)~

 

== ~BMINSC~ ~Oh! This is Boo! Boo meet Draco. Draco meet Boo.~

 

= Friend Draco? Boo wants to know, why you are sneezing so much and he also wants to know if there is a way to cure you.~

 

== ~M#DraB~ ~(sneezes once more) Please keep that animal away from me.~

 

= ~I think that is the best way to 'cure' me and tell Boo -- (sneeze)~

== ~BMINSC~ Alright then! Boo and I will remain far away from you until your disease ends.~

 

EXIT

 

I probably have some type of major mistake in there... :/

Link to comment

OK, next pass at this -

 

the

 

BEGIN

in your .d file "registers" a dialog with the game. That means you only want it once, and you want it to be what you will be using as the name of the dialog file called, so

 

BEGIN ~M#DraB.d~

 

should be

 

 

BEGIN ~##DraB~

 

(of course you want to put your own prefix instead of ##, so it won't accidentally overwrite other mod's stuff.)

 

for the CHAIN itself,

 

CHAIN IF ~InParty(“Myselfâ€) InParty(“Minscâ€) CombatCounter(0) !See([ENEMY]) Global(“##DracoMinscâ€,â€GLOBALâ€,0)~ THEN ~##DraB~ DracoMinsc1

~(sneezes for the third time) Minsc, what is that furry animal you are carrying?~

DO ~SetGlobal("##DracoMinsc","GLOBAL",1)~

 

== ~BMINSC~ ~Oh! This is Boo! Boo meet Draco. Draco meet Boo.~

 

= Friend Draco? Boo wants to know, why you are sneezing so much and he also wants to know if there is a way to cure you.~

 

== ~M#DraB~ ~(sneezes once more) Please keep that animal away from me.~

 

= ~I think that is the best way to 'cure' me and tell Boo -- (sneeze)~

== ~BMINSC~ Alright then! Boo and I will remain far away from you until your disease ends.~

 

EXIT

 

 

I am not sure the multisay will work - it might, I can't remember. I run them out with each line assigned to a dialog file, like this:

 

CHAIN IF ~InParty(“Myselfâ€) InParty(“Minscâ€) IsValidForDialog(“Minscâ€) CombatCounter(0) !See([ENEMY]) Global(“##DracoMinscâ€,â€GLOBALâ€,0)~ THEN ~##DraB~ DracoMinsc1
~(sneezes for the third time) Minsc, what is that furry animal you are carrying?~
DO ~SetGlobal("##DracoMinsc","GLOBAL",1)~
== ~BMINSC~ ~Oh! This is Boo! Boo meet Draco. Draco meet Boo.~
== ~BMINSC~ ~ Friend Draco? Boo wants to know, why you are sneezing so much and he also wants to know if there is a way to cure you.~
== ~M#DraB~ ~(sneezes once more) Please keep that animal away from me.~
== ~M#DraB~ ~I think that is the best way to 'cure' me and tell Boo -- (sneeze)~
== ~BMINSC~ Alright then! Boo and I will remain far away from you until your disease ends.~
EXIT

 

Note that you have this set up so it will immediately trigger when Minsc and your NPC is in the party. You might consider putting this on the banter file, so that it gets called randomly; either that, or set up some sort of delay, unless you want this to fire the very first script cycle (less than a second) it evaluates true. :)

Link to comment

It worked! :) Thank you both so much..

But I have some questions, how exactly do you put this file on the banter file so it doesn't fire away in less than one second? (Sorry, I'm REALLY new to this.)

And cmorgan, I tried your way of coding it was much easier, but when I installed my mod it said "installed with warnings."

It specifically said this:

 

WARNING: cannot verify trigger ~InParty(“Myselfâ€) InParty(“Minscâ€) IsValidForDialog(“Minscâ€) CombatCounter(0) !See([ENEMY]) Global(“M#DracoMinscâ€,â€GLOBALâ€,0)~:

Failure9"lexing: empty token")

 

I have one more question...if I were ever to release the mod I'm making (which will probably never happen), do you have to have your own prefix? Like, do you have register your very own?

Link to comment
Guest Guest_Ipsy_*

God I hate these captcha images...

 

You should be using !StateCheck("Myname",CD_STATE_NOTVALID) instead, and rather than just check Minsc, you should check both. Take a look at K'aeloree's tutorial on the use of CD_STATE_NOTVALID. So the banter checks would look like:

 

IF
~InParty(Myself)
InParty("Minsc")
!StateCheck("Minsc",CD_STATE_NOTVALID)
!StateCheck(Myself,CD_STATE_NOTVALID)
CombatCounter(0)
!See([ENEMY])
Global("##DracoMinsc","GLOBAL",0)~ THEN

 

I think that the problem was that you used IsValidForDialog, when IIRC it's IsValidForPartyDialog. So I think that that was the problem.

 

As for the matter of a prefix...yes, you should have your own. It allows mods to be compatible with the vanilla game and with one another. M# is already taken, though. Check which prefixes are available here, and then register one of your own here.

Link to comment
God I hate these captcha images...

 

You should be using !StateCheck("Myname",CD_STATE_NOTVALID) instead, and rather than just check Minsc, you should check both. Take a look at K'aeloree's tutorial on the use of CD_STATE_NOTVALID. So the banter checks would look like:

 

IF
~InParty(Myself)
InParty("Minsc")
!StateCheck("Minsc",CD_STATE_NOTVALID)
!StateCheck(Myself,CD_STATE_NOTVALID)
CombatCounter(0)
!See([ENEMY])
Global("##DracoMinsc","GLOBAL",0)~ THEN

 

I think that the problem was that you used IsValidForDialog, when IIRC it's IsValidForPartyDialog. So I think that that was the problem.

 

As for the matter of a prefix...yes, you should have your own. It allows mods to be compatible with the vanilla game and with one another. M# is already taken, though. Check which prefixes are available here, and then register one of your own here.

 

Thank you for the website. :)

I was lurking around the website when I came to the Azure mod. I was reading the readme, when it noted:

 

Never use "IsValidForPartyDialog()". It brakes chains and out-of-party objects cannot initiate dialogs.

 

And to prove it... http://forums.blackwyrmlair.net/index.php?showtopic=1220

So erm..I guess I won't be using that..

 

Also, the installation says the same thing as before....

Link to comment
Guest Guest_Ipsy_*

Can you post what you currently have for this banter? It could just be something small, like a missing tilde or quotation mark.

 

If for some reason you still can't figure out what's wrong, try using another mod as a guideline. Berelinde's Haldamir is a very good mod for this purpose--simple and bug-free.

Link to comment

yep - probably right on the lexing empty token, but it also could refer to ("Myself"

 

0x40A8 IsValidForPartyDialog(O:Object*)

0x40A8 IfValidForPartyDialog(O:Object*)

0x40A8 IsValidForPartyDialogue(O:Object*)

0x40A8 IfValidForPartyDialogue(O:Object*)

Returns true only if that specifed party member can take part in party dialogue.

 

all are valid and useable. But they are not the best - they do get flaky. So we have

 

InParty(Myself)

!StateCheck(Myself,CD_STATE_NOTVALID)

 

InParty("Minsc")

!StateCheck("Minsc",CD_STATE_NOTVALID)

 

CombatCounter(0)

!See([ENEMY])

 

Global("something","GLOBAL",0)

 

asa pattern. Kaeloree's tutorial has the modern usage. The only difficulty is you have to remember to create CD_STAT_NOTVALID in your .tp2, adding it to the game. K'aeloree's tutorial covers that, too.

 

 

For turning the dialog file into a banter file, there are a nuber of tutorials, and I think K'aeloree's covers this too, ar Theaceface's tutorial on NPC creation - or you could get the whole deal in one go at Dialog Files and How They Are Referenced (templates) (cmorgan). I wrote it out so folks could step through it, and it has several other tutorials referenced at the top.

 

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Mistakes you should not make when coding a NPC

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

1. Never use "IsValidForPartyDialog()". It brakes chains and out-of-party objects cannot initiate dialogs. It took me nearly 4 hours to find out why Kiral didn't talk to Azure, when he teleported.

 

balduran may have run into flakiness with the trigger, but the out-of-party reference... I wonder if he was trying to use

 

 

IsValidForPartyDialog("MyNPCThatIsNotInTheParty")

 

 

as a trigger for Kiral. That would not work, for sure - he isn't a party member.

 

BioWare uses a straight global setting, NumTimestalkedTo(), or the good ole tried and " ~True()~ "

 

BEGIN ~BODHIAMB~

IF ~True()
~ THEN BEGIN 0 // from:
 SAY ~You are becoming an impressive pest, one that I am finding difficult to ignore!~ [BODHIX33] /* #56479 */
 IF ~~ THEN GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.0
 SAY ~Honestly, <CHARNAME>, I simply do not know what to do with you. I grow tired of seeing you in my shadow.~ /* #56480 */
 IF ~~ THEN REPLY ~I was not the one that fled our last encounter, Bodhi. Sorry if I... scared you.~ /* #56521 */ GOTO 2
 IF ~~ THEN REPLY ~You are all shadow, Bodhi. I am the light that will mark the new day.~ /* #56522 */ GOTO 3
 IF ~~ THEN REPLY ~And I grow tired of you. I will have your head on a pike before we are through here!~ /* #56523 */ GOTO 4
END

for non-joinables. You can check that they exist and they are not dead, or use CD_STATE_NOTVALID on them. The trigger itself does work - a text search of the 323 decompiled BG2 valinna dialogs shows BioWare used that call a good bit (11136 hits in 323 files). They used script calls like

 

IF
Range([PC],15)
NumTimesTalkedTo(0)
THEN
RESPONSE #100
	StartDialog("belt",[PC])
END

Link to comment
Can you post what you currently have for this banter? It could just be something small, like a missing tilde or quotation mark.

 

If for some reason you still can't figure out what's wrong, try using another mod as a guideline. Berelinde's Haldamir is a very good mod for this purpose--simple and bug-free.

 

This is what I have so far...

 

BEGIN ~M#DraB~

 

CHAIN

 

IF ~InParty(“Myselfâ€)

InParty(“Minscâ€)

!StateCheck("Minsc",CD_STATE_NOTVALID)

!StateCheck(Myself,CD_STATE_NOTVALID)

CombatCounter(0)

!See([ENEMY])

Global(“M#DracoMinscâ€,â€GLOBALâ€,0)~ THEN ~M#DraB~ DracoMinsc1

~(sneezes for the third time) Minsc, what is that furry animal you are carrying?~

DO ~SetGlobal("M#DracoMinsc","GLOBAL",1)~

== ~BMINSC~ ~Oh! This is Boo! Boo meet Draco. Draco meet Boo.~

== ~BMINSC~ ~Friend Draco? Boo wants to know, why you are sneezing so much and he also wants to know if there is a way to cure you.~

== ~M#DraB~ ~(sneezes once more) Please keep that animal away from me.~

== ~M#DraB~ ~I think that is the best way to 'cure' me and tell Boo -- (sneeze).~

== ~BMINSC~ ~Alright then! Boo and I will remain far away from you until your disease ends.~

EXIT

Link to comment
yep - probably right on the lexing empty token, but it also could refer to ("Myself"

 

0x40A8 IsValidForPartyDialog(O:Object*)

0x40A8 IfValidForPartyDialog(O:Object*)

0x40A8 IsValidForPartyDialogue(O:Object*)

0x40A8 IfValidForPartyDialogue(O:Object*)

Returns true only if that specifed party member can take part in party dialogue.

 

all are valid and useable. But they are not the best - they do get flaky. So we have

 

InParty(Myself)

!StateCheck(Myself,CD_STATE_NOTVALID)

 

InParty("Minsc")

!StateCheck("Minsc",CD_STATE_NOTVALID)

 

CombatCounter(0)

!See([ENEMY])

 

Global("something","GLOBAL",0)

 

asa pattern. Kaeloree's tutorial has the modern usage. The only difficulty is you have to remember to create CD_STAT_NOTVALID in your .tp2, adding it to the game. K'aeloree's tutorial covers that, too.

 

 

For turning the dialog file into a banter file, there are a nuber of tutorials, and I think K'aeloree's covers this too, ar Theaceface's tutorial on NPC creation - or you could get the whole deal in one go at Dialog Files and How They Are Referenced (templates) (cmorgan). I wrote it out so folks could step through it, and it has several other tutorials referenced at the top.

 

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Mistakes you should not make when coding a NPC

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

1. Never use "IsValidForPartyDialog()". It brakes chains and out-of-party objects cannot initiate dialogs. It took me nearly 4 hours to find out why Kiral didn't talk to Azure, when he teleported.

 

balduran may have run into flakiness with the trigger, but the out-of-party reference... I wonder if he was trying to use

 

 

IsValidForPartyDialog("MyNPCThatIsNotInTheParty")

 

 

as a trigger for Kiral. That would not work, for sure - he isn't a party member.

 

BioWare uses a straight global setting, NumTimestalkedTo(), or the good ole tried and " ~True()~ "

 

BEGIN ~BODHIAMB~

IF ~True()
~ THEN BEGIN 0 // from:
 SAY ~You are becoming an impressive pest, one that I am finding difficult to ignore!~ [BODHIX33] /* #56479 */
 IF ~~ THEN GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.0
 SAY ~Honestly, <CHARNAME>, I simply do not know what to do with you. I grow tired of seeing you in my shadow.~ /* #56480 */
 IF ~~ THEN REPLY ~I was not the one that fled our last encounter, Bodhi. Sorry if I... scared you.~ /* #56521 */ GOTO 2
 IF ~~ THEN REPLY ~You are all shadow, Bodhi. I am the light that will mark the new day.~ /* #56522 */ GOTO 3
 IF ~~ THEN REPLY ~And I grow tired of you. I will have your head on a pike before we are through here!~ /* #56523 */ GOTO 4
END

for non-joinables. You can check that they exist and they are not dead, or use CD_STATE_NOTVALID on them. The trigger itself does work - a text search of the 323 decompiled BG2 valinna dialogs shows BioWare used that call a good bit (11136 hits in 323 files). They used script calls like

 

IF
Range([PC],15)
NumTimesTalkedTo(0)
THEN
RESPONSE #100
	StartDialog("belt",[PC])
END

 

Erm...can you tell what exactly is a lexing token and I looked at some other D files about banter, they have these numbers, for example:

 

SAY @0

 

Something quite like that.... and about what you said for the above, I didn't get nearly half of it. I am sorry. :/

Link to comment
CHAIN

IF ~InParty(“Myself”)

InParty(“Minsc”)

CombatCounter(0) !See([ENEMY])

Global(“M#DracoMinsc”,”GLOBAL”,0)

THEN M#DraB DracoMinsc1

You're still missing a tilde. Tildes always come in pairs. You need one following your last check, in this case Global(“M#DracoMinsc”,”GLOBAL”,0).

The rest seems OK, except here:

== ~BMINSC~ ~Oh! This is Boo! Boo meet Draco. Draco meet Boo.~

== ~BMINSC~ ~Friend Draco? Boo wants to know, why you are sneezing so much and he also wants to know if there is a way to cure you.~

You can do it like this:

== ~BMINSC~ ~Oh! This is Boo! Boo meet Draco. Draco meet Boo.~
= ~Friend Draco? Boo wants to know, why you are sneezing so much and he also wants to know if there is a way to cure you.~

This only applies if one character has several lines in a row that you want separated--it's called multisay, as cmorgan mentioned above. I've never had problems using it in the way I showed.

 

 

SAY @0

That simply means that the mod has been tra-ified. The code remains in the D file, but the actual dialogue is in a different file, with the extension TRA. The @0 indicates that that line is line 0 in the TRA file. So if you're looking at text like that, you're just seeing the code :)

 

Something quite like that.... and about what you said for the above, I didn't get nearly half of it. I am sorry. :/

What were you having problems with?

Link to comment
CHAIN

IF ~InParty(“Myselfâ€)

InParty(“Minscâ€)

CombatCounter(0) !See([ENEMY])

Global(“M#DracoMinscâ€,â€GLOBALâ€,0)

THEN M#DraB DracoMinsc1

You're still missing a tilde. Tildes always come in pairs. You need one following your last check, in this case Global(“M#DracoMinscâ€,â€GLOBALâ€,0).

The rest seems OK, except here:

== ~BMINSC~ ~Oh! This is Boo! Boo meet Draco. Draco meet Boo.~

== ~BMINSC~ ~Friend Draco? Boo wants to know, why you are sneezing so much and he also wants to know if there is a way to cure you.~

You can do it like this:

== ~BMINSC~ ~Oh! This is Boo! Boo meet Draco. Draco meet Boo.~
= ~Friend Draco? Boo wants to know, why you are sneezing so much and he also wants to know if there is a way to cure you.~

This only applies if one character has several lines in a row that you want separated--it's called multisay, as cmorgan mentioned above. I've never had problems using it in the way I showed.

 

 

SAY @0

That simply means that the mod has been tra-ified. The code remains in the D file, but the actual dialogue is in a different file, with the extension TRA. The @0 indicates that that line is line 0 in the TRA file. So if you're looking at text like that, you're just seeing the code :)

 

Something quite like that.... and about what you said for the above, I didn't get nearly half of it. I am sorry. :/

What were you having problems with?

 

Hmm...thank you. :)

 

I had trouble understanding:

 

yep - probably right on the lexing empty token, but it also could refer to ("Myself"

 

0x40A8 IsValidForPartyDialog(O:Object*)

0x40A8 IfValidForPartyDialog(O:Object*)

0x40A8 IsValidForPartyDialogue(O:Object*)

0x40A8 IfValidForPartyDialogue(O:Object*)

Returns true only if that specifed party member can take part in party dialogue.

 

And then when cmorgan says how Bioware uses global settings.

 

Hehe, it seems I have knack for getting into more trouble when I tried to install the mod with the banter file. I probably misread something......again, and for that I am sorry ;) :

 

[Draco/M#DraB.d] PARSE ERROR at line 6 column 1-7

Near Text: InParty

Parsing.Parse_error

ERROR: parsing [Draco/M#DraB.d]: Parsing Parse_error

ERROR: compiling [Draco/M#DraB.d]!

Stopping installation because of error.

 

Thank you very very VERY much for all of your help. :puke:

Link to comment

InParty("Myself") will parse just fine, but it will never return true. The banter will never fire.

 

The reason for this is that it's looking for a creature that has a DV of Myself. If you want to use Myself as an object, use it without the quotes.

 

InParty(Myself)

!StateCheck(Myself,CD_STATE_NOTVALID)

 

Could you post your entire banter file (or at least everything from line 1 to line 12 or so)? The error will always be above the line where WeiDU says it is, so we need to see everything from the first BEGIN to the line WeiDU identifies.

 

When WeiDU says "lexing an empty token," it almost always means that you're missing a tilde. I see it.

 

CHAIN

IF ~InParty(Myself)

InParty("Minsc")

CombatCounter(0) !See([ENEMY])

Global("M#DracoMinsc","GLOBAL",0)~

THEN M#DraB DracoMinsc1

 

But when I was quoting this, I found another error. You are using slanted quotes. WeiDU can't handle them.

 

Do not use MS Word for anything modding-related. Get yourself a good text editor instead. I use Crimson Editor. It has nifty WeiDU highlighters, available here at G3, that highlight coding keywords, and that makes life much easier. It also has a feature that highlights strings, which makes it easier to find the missing tildes.

Link to comment
InParty("Myself") will parse just fine, but it will never return true. The banter will never fire.

 

The reason for this is that it's looking for a creature that has a DV of Myself. If you want to use Myself as an object, use it without the quotes.

 

InParty(Myself)

!StateCheck(Myself,CD_STATE_NOTVALID)

 

Could you post your entire banter file (or at least everything from line 1 to line 12 or so)? The error will always be above the line where WeiDU says it is, so we need to see everything from the first BEGIN to the line WeiDU identifies.

 

When WeiDU says "lexing an empty token," it almost always means that you're missing a tilde. I see it.

 

CHAIN

IF ~InParty(Myself)

InParty("Minsc")

CombatCounter(0) !See([ENEMY])

Global("M#DracoMinsc","GLOBAL",0)~

THEN M#DraB DracoMinsc1

 

But when I was quoting this, I found another error. You are using slanted quotes. WeiDU can't handle them.

 

Do not use MS Word for anything modding-related. Get yourself a good text editor instead. I use Crimson Editor. It has nifty WeiDU highlighters, available here at G3, that highlight coding keywords, and that makes life much easier. It also has a feature that highlights strings, which makes it easier to find the missing tildes.

 

Oh, I never realized that...and I'm using ConText with the WeiDU highlighters, so should I still switch to the Crimson Editor? And thank you for helping me! :)

Here's my whole file:

 

BEGIN ~M#DraB~

 

CHAIN

 

IF ~InParty(Myself)~

InParty(“Minscâ€)

!StateCheck("Minsc",CD_STATE_NOTVALID)

!StateCheck(Myself,CD_STATE_NOTVALID)

CombatCounter(0)

!See([ENEMY])

Global(“M#DracoMinscâ€,â€GLOBALâ€,0)~

THEN ~M#DraB~ DracoMinsc1

~(sneezes for the third time) Minsc, what is that furry animal you are carrying?~

DO ~SetGlobal("M#DracoMinsc","GLOBAL",1)~

== ~Oh! This is Boo! Boo meet Draco. Draco meet Boo.~

= ~Friend Draco? Boo wants to know, why you are sneezing so much and he also wants to know if there is a way to cure you.~

== ~M#DraB~ ~(sneezes once more) Please keep that animal away from me.~

= ~I think that is the best way to 'cure' me and tell Boo -- (sneeze).~

== ~BMINSC~ ~Alright then! Boo and I will remain far away from you until your disease ends.~

EXIT

Link to comment

Archived

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

×
×
  • Create New...