How to increment a variable in gamestate

Hi there,

I have a public int32 variable in my gamestate that is exposed to blueprint (via c++). I have a button and I would like to increment the variable with 1 when I press the button. I’m been trying the incrementInt macro thing, but it sais: Error Cannot write to const Target, when I try to compile the BP.

Can anyone show me how to do this?

Thanks!