ThePix / quest

Tutorials and Libraries for quest 5
14 stars 11 forks source link

Error with CombatLib #13

Closed 1123Nenrei closed 4 years ago

1123Nenrei commented 4 years ago

This error message appears when I reach the third room or interact with an NPC:

Error running script: Error compiling expression 'ListCombine(game.attackers, game.friends)': FunctionCallElement: Could find not function 'ListCombine(Object, Object)'

Someone else asked about this on the Quest forum two years ago, but they received no answer. I have a foggy idea that the problem has to do with the object lists related to allegiance, but since I'm new to this I'm not sure how to fix it. Any help would be appreciated!

ThePix commented 4 years ago

It has been a while since I did anything with CombtLib (or Quest 5 really), but when an error says "Object" it often means null, so what it is saying is that it cannot find a function ListCombine(null, null) to correspond to the call "ListCombine(game.attackers, game.friends)", which in turn means that both game.attackers and game.friends are null, i.e., do not exist.

My guess is that they should be set by calling CombatInitialise, so first check you do that. If so, try going to the game object and adding those two attributes as empty object lists, and see what happens.

1123Nenrei commented 4 years ago

I called CombatInitialise and it fixed the problem. Thanks!