Jump to content

Coding Error on Banter File


Kendris

Recommended Posts

I'm getting the following error when trying to compile my banter file:

 

[ValenNPC\BKEValen.d] LEXER ERROR at line 25 column 5-11

Near Text: (

invalid character [(]

 

[ValenNPC\BKEValen.d] ERROR at line 25 column 5-11

Near Text: (

Parsing.Parse_error

ERROR: parsing [ValenNPC\BKEValen.d]: Parsing.Parse_error

ERROR: compiling [ValenNPC\BKEValen.d]!

Stopping installation because of error.

 

The block of code & the line in question is this:

 

CHAIN

IF ~InParty("Anomen")

See("Anomen")

!StateCheck("Anomen",STATE_SLEEPING)

!StateCheck("KEValen",STATE_SLEEPING)

CombatCounter(0)

!See([ENEMY])

Global("KEValenAnomen1","LOCALS",0)~ THEN BKEVALEN KEValenAnomen1

 

An identical coding block for Aerie before this one apparently ran without incident. I tried copying & pasting ("Aerie"), then changing the name to Anomen, without any effect.

 

Any ideas? Generally, the DEBUG file has let me figure out what my parsing & syntax errors are, but I'm currently stumped.

Link to comment

You might want to take a look at the banter right above it, and see if it is EXIT ing properly, of it was PC banter, that it has 2 END s etc. WeiDU reports where it stumbles, but the stiumbling reason can be above or below the problem.

 

Edit: Or, Invalid character! Try replacing the ( and " in ConText or any other Text Editor, instead of Word. Word has... tendencies.

Link to comment
Snag my highlighters from the wiki or PM me - crimson rock at finding this stuff when you turn on the WeiDUString syntax, and half your page goes dark - it really helped me!

 

Thanks! That looks like it's going to be VERY helpful!

 

The file compiled & loaded; is there any way to check to see if unscripted banter is working correctly besides loading a game & waiting for one to fire? Am I correct in thinking that banters without weights are given lower priority than weighted banters, or am I completely missing the concept?

Link to comment
The file compiled & loaded; is there any way to check to see if unscripted banter is working correctly besides loading a game & waiting for one to fire?

 

There are scripted banters, and non-scripted ones. Scripted banter is a banter that has .baf code and .d code. To see it in the game, you must meet all conditions written in .baf code. Non-scripted banter(in B file, usually) is a banter that has .d code only. To trigger it, you have to activate the console and keep pressing ctrl-i.

 

Am I correct in thinking that banters without weights are given lower priority than weighted banters, or am I completely missing the concept?

 

Depends. If you are using your own character, weights aren't needed at all: you just place banters in whichever order you need, so the top priority ones are on top.

 

If you are using another character(who already has thirty banters, and you want *your*, thirty-first, banter, to be of value), then, yes, WEIGHT #-1 is your friend - then it will trigger first. It is recommended to script banters with WEIGHT #-1 - so they do not hinder banters added by other mods. But it is not necessary.

Link to comment
Hmmm, so even unscripted banters aren't called randomly? They're just called in order from the list? That's going to be a serious pain for something I want to do.

 

Remember, you can always add a scripted banter on a timer, or even use a random timer - that is, you could easily feign randomness.

 

(Here is probably a good place to say that adding things without replacing any existing banter is a good practice).

Link to comment

Archived

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

×
×
  • Create New...