First, what type and value is y ?
Why do you use a type for only one variable.
Why dont's you use this code:
Dim mCount(3) As Int
' looping through in activity create
b.Tag = y
Sub button_Click
Dim b As Button
b = Sender
Dim i As Int
i = b.Tag
mCount(i) = mCount(i) +1
b.Text = mCount(i)
End Sub
The problem in your code is:
You define i as indices, which is a type variable
and you expect it beeing an integer in mCount(i)?
Dim i As indices
i = b.Tag
mCount(i) = mCount(i) +1
You code should look like this:
Dim i As indices
i = b.Tag
mCount(i.y) = mCount(i.y) +1
Best regards.