Adding to an int on the press of a button

This maybe easy or on another post that i could find in my search, if so sorry.

I want to add 1 to an int when i press a button and the in is greater than 0 and less than 193

here is what i am trying.

[code]
qv1 = system.tag.read(“Folder/Int”)

if qv1 > 0 and qv1 < 193:

system.tag.writeToTag('Folder/Int', qv1+1)[/code]

Hi there,

You are close. Try this:

[code]qv1 = system.tag.read(“Folder/Int”).value

if qv1 > 0 and qv1 < 193:

system.tag.writeToTag(‘Folder/Int’, qv1+1)[/code]Best,