So I've been, making a dice roller for my project that I call: The dungeon master's assistant for helping me DM but now let's talk about my problem.
When I press the button RollDice which is supposed to take two text inputs (Type and number of dice) and roll dice and then right now print the number and type of dice and the result in the console. However, this crashes the program instead.
This the relevant python code(can show more if needed):
class DiceRoller(Screen):
def rolldice(self):
self.diceNumber = ObjectProperty()
self.diceType = ObjectProperty()
print(F"{self.diceNumber}D{self.diceType}")
for x in self.diceNumber:
x = x + 1
ActualDie = random.randint(1, self.diceType)
Total = Total + ActualDie
print(Total)
Here is the button that calls the function above:
Button:
id: RollDice
text: "Roll dice"
pos_hint: {"top":0.3,"x":0}
size_hint: 0.4, 0.2
background_color: 0,0,0,0.1
color: 0,0,0,1
on_release:
root.rolldice()
As I said and showed what is supposed to happen is that it's supposed to print for example 6D6 and then print the total of those dice rolls. However, this is what happens(error code):
The value is set by two text input boxes on the same screen: link in the kv file.

