Incrementing a key value in the dictionary

I am creating a simple program to record all the players, if I entered a player already existing in the database, it will not be record but the count will be incremented. I encountered a problem when I tried to use the mathematical operation by adding one to the value of the count field. A runtime error with this message The operation * cannot accept the arguments, [1],[[1]] whenever a used the mathematical operation with the value of the key in dictionary. it seems the value is in text but I can't convert it to number, Below is the programming blocks.

The blocks you show don't include the use of '*', the multiplication operator.

While we are discussing those blocks, the lookup of the value for Count should return a default of 0, not 'not found', to assure error free startup of new Name/Count sets.

Apply a Do It to that global list of dictionaries to show us what's in it.

Do not use a list, but a dictionary.
Name as key, and count as value.

image

1 Like

Yes, much simpler!

Yes, thank you very much.This has solved my problem and it is much simpler.