Combatstuff error

Forgewright
07 Jul 2017, 17:11

@pixie, this error comes up on a new game:
Game.command successful= true
Cannot convert object to Boolean

I found it in “combatstuff.xml”
// Check sneaking
if (not HasInt(game.pov, "sneaklevel")) {
game.pov.sneaklevel = 0
}
game.pov.sneaklevel = game.pov.sneaklevel - 1
if (0 > game.pov.sneaklevel) game.pov.sneaklevel = 0

    // Some attacks give a bonus to OB next round
    game.pov.ob_bonus = game.pov.next_round_ob_bonus
    game.pov.next_round_ob_bonus = 0
    game.pov.db_bonus = 0
    game.pov.currectattack = null
  }

  else {
    game.command_successful = true

I have included libraries:


The Pixie
07 Jul 2017, 17:20

All I can think of off-hand is that you are not calling CombatInitialise in the game start script.


Forgewright
07 Jul 2017, 17:58

That's it! The old CombatLib needed CombatInitialise (false). I tried it with the new one and got an error so I left it out.
Thanks Pixie