Jump to content

help with detecting a parse error


kreso

Recommended Posts

What title says. How can I find the error? I edited the .baf file, looked at line 2078, but nothing's wrong with it...

 

[tb#_compile_eval_buffer/stratagems_external/workspace\ssl_out\dw#plane.baf] PARSE ERROR at line 2078 column 1-38
Near Text: )
syntax error
ERROR: parsing [tb#_compile_eval_buffer/stratagems_external/workspace\ssl_out\dw#plane.baf]: Parsing.Parse_error
ERROR: error compiling [tb#_compile_eval_buffer/stratagems_external/workspace\ssl_out\dw#plane.baf]: Parsing.Parse_error
ERROR: compiling [stratagems_external/workspace\ssl_out\dw#plane.baf]!
Link to comment

Well, I'm stuck here. I tought the above typo would fix it, but it didn't. Now, even if I replace the file I edited with a working one, it still won't compile.

Act of desperation at hand - spot the error:

Actually, turns out this is fine, but another script wasn't... :D

 

 

INCLUDE FILE(%scsroot%/mage/ssl/mage_definitions.ssl)
INCLUDE FILE(%scsroot%/genai/ssl/genai_definitions.ssl)
INCLUDE FILE(%scsroot%/celestial/ssl/celestial_definitions.ssl)

INCLUDE FILE(%scsroot%/genai/ssl/chase_top.ssl)


IF
Die()
Alignment(Myself,MASK_EVIL)
THEN
RESPONSE #100
CreateVisualEffectObject("SPUNHOLY",Myself)
DestroySelf()
END

IF
Die()
!Alignment(Myself,MASK_EVIL)
THEN
RESPONSE #100
CreateVisualEffectObject("SPHOLY",Myself)
DestroySelf()
END

IF TRIGGER
HPPercentLT(Myself,40)
THEN DO
Action(SpellMyself,CLERIC_HEAL)
END

IF TRIGGER
See(NearestEnemyOf(Myself))
TriggerBlock(TruesightSafe)
!StateCheck(Myself,STATE_IMPROVEDINVISIBILITY)
THEN DO
Action(SpellMyself,WIZARD_IMPROVED_INVISIBILITY|100|50)
END

IF TRIGGER
TargetBlock(PCsInOrder)
TriggerBlock(Enemy)
!NumCreatureGT([ENEMY],1)
THEN DO
Action(Spell,CLERIC_FIRE_STORM)
END

IF TRIGGER
TargetBlock(VillainsInOrder)
CheckStatGT(scstarget,14,Level)
StateCheck(scstarget,STATE_PANIC)
THEN DO
Action(Spell,CLERIC_REMOVE_FEAR)
END


IF TRIGGER
CheckStat(Myself,0,CLERIC_BLADE_BARRIER)
Range(NearestEnemyOf(Myself),5)
THEN DO
Action(SpellMyself,CLERIC_GLOBE_OF_BLADES)
END

IF TRIGGER
TargetBlock(VillainsInOrder)
CheckStatGT(scstarget,14,Level)
HPPercentLT(scstarget,50)
Range(scstarget,16)
THEN DO
Action(Spell,CLERIC_HEAL|100|50)
END

IF TRIGGER
IgnoreBlock(Demivrgvs)
TargetBlock(PCSpellcasters)
!CheckStatGT(scstarget,0,CLERIC_INSECT_PLAGUE)
TriggerBlock(MR100|SIConjuration|Enemy)
THEN DO
Action(Spell,CLERIC_INSECT_PLAGUE|100|50)
END

IF TRIGGER
RequireBlock(Demivrgvs)
TargetBlock(PCSpellcasters)
!CheckStatGT(scstarget,0,CLERIC_INSECT_PLAGUE)
TriggerBlock(SIConjuration|Enemy) // Insect spells ignore MR
!HasItemEquiped("NPstaf",scstarget) // Staff of High Forest (Insect-spells immune)
THEN DO
Action(Spell,CLERIC_INSECT_PLAGUE|100|50)
END

IF TRIGGER
TargetBlock(PCsInOrder)
Range(scstarget,10)
TriggerBlock(MR100|SIConjuration|Enemy)
THEN DO
Combine()
Action(Spell,CLERIC_UNHOLY_WORD|100|50)
Action(Spell,CLERIC_HOLY_WORD|100|50)
END


IF TRIGGER
TargetBlock(EnemiesInOrder)
CheckStat(FourthNearest([ENEMY]),0,TRUE_SIGHT)
CheckStat(ThirdNearest([ENEMY]),0,TRUE_SIGHT)
CheckStat(SecondNearest([ENEMY]),0,TRUE_SIGHT)
CheckStat([ENEMY],0,TRUE_SIGHT)
CheckStat(Myself,0,TRUE_SIGHT)
OR(4)
StateCheck(scstarget,STATE_INVISIBLE)
StateCheck(scstarget,STATE_IMPROVEDINVISIBILITY)
StateCheck(scstarget,STATE_MIRRORIMAGE)
Gender(scstarget,ILLUSIONARY)
!Allegiance(scstarget,ENEMY)
TriggerBlock(SIDivination)
THEN DO
Combine()
Action(SpellMyself,WIZARD_TRUE_SIGHT|100|50)
END

///////////////////////////////
//// Symbol: Fear
///////////////////////////////

IF TRIGGER
IgnoreBlock(Demivrgvs)
TargetBlock(EnemiesInOrder)
TriggerBlock(Panic|MR|SIConjuration|Enemy)
THEN DO
Combine()
Action(Spell,CLERIC_SYMBOL_FEAR|100|50)
END

IF TRIGGER
RequireBlock(Demivrgvs)
TargetBlock(EnemiesInOrder)
TriggerBlock(Panic|MR|SIConjuration|Enemy)
!HasItemEquiped("staf20",scstarget) // Staff of Rynn (Doom, Symbols, Horror, Emotion, PW:Blind immune)
THEN DO
Combine()
Action(Spell,CLERIC_SYMBOL_FEAR|100|50)
END

///////////////////////////////
//// Symbol: Death
///////////////////////////////

IF TRIGGER
IgnoreBlock(Demivrgvs)
TargetBlock(EnemiesInOrder)
TriggerBlock(Slay|MR|SIConjuration|Enemy)
THEN DO
Combine()
Action(SpellRES,"sppr719"|100|50)
END

IF TRIGGER
RequireBlock(Demivrgvs)
TargetBlock(EnemiesInOrder)
TriggerBlock(Slay|SIConjuration|MR|Enemy)
!HasItemEquiped("staf20",scstarget) // Staff of Rynn (Doom, Symbols, Horror, Emotion, PW:Blind immune)
THEN DO
Combine()
Action(SpellRES,"sppr719"|100|50)
END

//////////////////////////////////////////////////////////////////////////
/// Use magic missiles to bring down mirror images
//////////////////////////////////////////////////////////////////////////

IF TRIGGER
IgnoreBlock(Demivrgvs)
TargetBlock(PCSpellcasters)
TriggerBlock(MR100|SIEvocation|Enemy)
StateCheck(scstarget,STATE_MIRRORIMAGE)
THEN DO
Action(Spell,WIZARD_MAGIC_MISSILE)
END

IF TRIGGER
RequireBlock(Demivrgvs)
TargetBlock(PCSpellcasters)
TriggerBlock(MR100|SIEvocation|MinorGlobe|SpellTurn|Enemy|L1safe|MagicMissile) // standard MM check
StateCheck(scstarget,STATE_MIRRORIMAGE)
THEN DO
Action(Spell,WIZARD_MAGIC_MISSILE)
END


/////////////////////////////////////////////////////////////////////////
//// Flame Arrows
/////////////////////////////////////////////////////////////////////////

IF TRIGGER
IgnoreBlock(Demivrgvs)
ConditionalTargetBlock(PCsPreferringWeak;HPPercentLT(scstarget,40)&!CheckStatGT(scstarget,50,RESISTMAGIC)&!CheckStatGT(scstarget,50,RESISTFIRE))
ConditionalTargetBlock(PCsPreferringWeak;!CheckStatGT(scstarget,50,RESISTMAGIC)&!CheckStatGT(scstarget,50,RESISTFIRE))
TargetBlock(EnemiesInOrderShort)
!HasItem("clck26",scstarget)
TriggerBlock(MR100|Enemy|ArrowSafe|SpellTurn|Stoneskin|MinorGlobe|MirrorImage|Helpless|SIConjuration)
THEN DO
Action(Spell,WIZARD_FLAME_ARROW|100|50)
END

IF TRIGGER
RequireBlock(Demivrgvs)
ConditionalTargetBlock(PCsPreferringWeak;HPPercentLT(scstarget,40)&!CheckStatGT(scstarget,50,RESISTMAGIC)&!CheckStatGT(scstarget,50,RESISTFIRE))
ConditionalTargetBlock(PCsPreferringWeak;!CheckStatGT(scstarget,50,RESISTMAGIC)&!CheckStatGT(scstarget,50,RESISTFIRE))
TargetBlock(EnemiesInOrderShort)
TriggerBlock(MR100|Enemy|ArrowSafe|SpellTurn|MinorGlobe|MirrorImage|Helpless|SIConjuration) // removed stonskin
THEN DO
Action(Spell,WIZARD_FLAME_ARROW|100|50)
END

//////////////////////
//// Chaos
/////////////////////////////////

IF TRIGGER
TargetBlock(EnemiesInOrder)
TriggerBlock(MR|Confused|SIEnchantment|Enemy|Helpless|ConfuseProof) // added ConfuseProof
THEN DO
Combine()
Action(Spell,WIZARD_CHAOS|100|50)
END

/////////////////////////////////////////////////////////////////////////
/// Flame Strike
/////////////////////////////////////////////////////////////////////////

IF TRIGGER
IgnoreBlock(Demivrgvs)
ConditionalTargetBlock(PCsPreferringWeak;!CheckStatGT(scstarget,50,RESISTMAGIC)&!CheckStatGT(scstarget,50,RESISTFIRE))
TargetBlock(EnemiesInOrderShort)
TriggerBlock(MR100|SIEvocation|Enemy|MirrorImage)
!HasItem("clck26",scstarget)
THEN DO
Action(Spell,CLERIC_FLAME_STRIKE|100|100)
END

IF TRIGGER
RequireBlock(Demivrgvs)
ConditionalTargetBlock(PCsPreferringWeak;!CheckStatGT(scstarget,50,RESISTMAGIC)&!CheckStatGT(scstarget,50,RESISTFIRE))
TargetBlock(EnemiesInOrderShort)
TriggerBlock(MR100|SIEvocation|Enemy|MirrorImage)
THEN DO
Action(Spell,CLERIC_FLAME_STRIKE|100|100)
END

/////////////////////////////////////////////////////////////////////////
//// Magic Missile
/////////////////////////////////////////////////////////////////////////

IF TRIGGER
IgnoreBlock(Demivrgvs)
ConditionalTargetBlock(PCsPreferringWeak;!CheckStatGT(scstarget,50,RESISTMAGIC)&HPPercentLT(scstarget,40))
ConditionalTargetBlock(PCsPreferringWeak;!CheckStatGT(scstarget,50,RESISTMAGIC))
TargetBlock(EnemiesInOrderShort)
TriggerBlock(MR100|SIEvocation|MinorGlobe|SpellTurn|Enemy|MagicMissile)
!HasItem("clck26",scstarget)
THEN DO
Action(Spell,WIZARD_MAGIC_MISSILE|150|50)
END

IF TRIGGER
RequireBlock(Demivrgvs)
ConditionalTargetBlock(PCsPreferringWeak;!CheckStatGT(scstarget,50,RESISTMAGIC)&HPPercentLT(scstarget,40))
ConditionalTargetBlock(PCsPreferringWeak;!CheckStatGT(scstarget,50,RESISTMAGIC))
TargetBlock(EnemiesInOrderShort)
TriggerBlock(MR100|SIEvocation|MinorGlobe|SpellTurn|Enemy|L1safe|MagicMissile) // standard MM check
THEN DO
Action(Spell,WIZARD_MAGIC_MISSILE|150|50)
END

BEGIN LOOP(MyWeaponStrength||3)
BEGIN LOOP(MyWeaponDamageType||Slashing)
INCLUDE FILE(%scsroot%/genai/ssl/dw#wtacor.ssl)
INCLUDE FILE(%scsroot%/genai/ssl/move.ssl)
INCLUDE FILE(%scsroot%/mage/ssl/bg2/generalblocks/chase.ssl)
END LOOP
END LOOP

 

Link to comment

That's an SSL file. If you find the .baf file that gets generated from this file, you'll have a better time tracking down the line numbers reported in the error message, and other people might be able to assist you. Very few people are familiar with SSL.

Link to comment

I don't get it. It reports error, exits the installer, but the file is actually compiled.

That .baf file compiled fine for me after I swapped the states and stats for ones that existed in my install.

Do you have SR installed?

Link to comment

 

Do you have SR installed?

 

No SR and no Detectable Spells.

 

Well, it does work for me w/o SR as well, hence the problem is in something I've added to the ssl file. I tried re-writing the triggerblocks, but install fails again. Meh.

Link to comment

Archived

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

×
×
  • Create New...