Error. Using Pixie combat library
Leon Kitsune
12 Jul 2014, 18:18I'm not to sure what I can do to fix this. :/ I'm using the library so I used the GUI to set most of the stuff. I'll paste the error message and if you need a specific code strand I will paste that upon request.
Error running script: Error compiling expression 'GetRandomInt (1, 20) - this.defence + game.pov.attack': ArithmeticElement: Operation 'Add' is not defined for types 'Int32' and 'Object'
Error running script: Error compiling expression 'GetRandomInt (1, 20) - game.pov.defence + this.attackbonus': ArithmeticElement: Operation 'Subtract' is not defined for types 'Int32' and 'Object'
Error running script: Error compiling expression 'GetRandomInt (1, 20) - this.defence + game.pov.attack': ArithmeticElement: Operation 'Add' is not defined for types 'Int32' and 'Object'
Error running script: Error compiling expression 'GetRandomInt (1, 20) - game.pov.defence + this.attackbonus': ArithmeticElement: Operation 'Subtract' is not defined for types 'Int32' and 'Object'

Pertex
12 Jul 2014, 18:23Hmm, this message says that this.defence and this.attackbonus is not an integer variable. Perhaps you have to initialize this variables with an integer value

jaynabonne
12 Jul 2014, 18:40Looks like it could actually be game.pov.attack and game.pov.defence that are undefined (based on the error messages).

jaynabonne
12 Jul 2014, 19:14This page has info on it:
http://quest5.net/wiki/Simple_Combat_System_(Advanced)
In particular, under the section on the player object, it shows this as an example:
http://quest5.net/wiki/Simple_Combat_System_(Advanced)
In particular, under the section on the player object, it shows this as an example:
<object name="player">
<inherit name="defaultplayer" />
<attack type="int">2</attack>
<defence type="int">0</defence>
<armour type="int">0</armour>
<hitpoints type="int">25</hitpoints>
<status>-</status>
<statusattributes type="stringdictionary">status = ;equippedstatus = !</statusattributes>
<equippedstatus>Wielding: nothing</equippedstatus>
</object>
Leon Kitsune
12 Jul 2014, 20:00Adding the attributes didn't do much. I copypasted the code and all it changed was my status attributes. Do the attributes need a specific script or something for them to work. The tutorial was a bit unclear. Since I have the library a lot of the coding is already there its just a matter of working out kinks with the attributes
HegemonKhan
13 Jul 2014, 04:03possibly:
did you set your 'player' as the game.pov:
<game name="blah">
<pov type="object">player</pov>
</game>
did you set your 'player' as the game.pov:
<game name="blah">
<pov type="object">player</pov>
</game>

jaynabonne
13 Jul 2014, 07:41did you set your 'player' as the game.pov:
You don't need to. "player" is used as the default game.pov if none else is set.
Leon Kitsune
14 Jul 2014, 03:59Sooo I fixed everything but I ran into a annoying issue. Dead monsters are attacking still and the monster object type was going unknown for whatever reason. After several tests i found out the library has bugs. This was tested in the Combat Demo.
Something in here is messing up my game.
Something in here is messing up my game.
