Hello everyone,
I have a database of equipment objects (like armors, weapons, etc) and I have a field “equiped” that can be true or false, according to the status of the object (equiped or not). Every object have many other fields with caracteristics (damage, armor, etc…).
In order to calculate total armor, damage, etc, from my character, I want to sum every caracteristics of the equiped items.
So I created some Number variables in my app, with SQL queries like this one :
SELECT SUM(“Armor”) FROM data WHERE “Equiped”==“true”
In the SQL window, it works fine, but when I go back to the app, the number value is always 0. How can I get these sums ? In a way that can be responsive, like if I equip a weapon, it will update automatically…