Questions about variable effects item

Hi guys!
I tried to made a system which item is given to the player based on the value stored in a variable.
for example:
when variableX >=50, obtain[flower red]+1, [flower blue]-1;
when variableX >=30, obtain[flower blue]+1, [flower red]-1 etc

Here's the event page
1632631924789.png


Everything works fine but when I re-open main menu for several times, the item will add-on automatically until x99, but I only need x1 for the specific item
How should I solve this? Thanks in advance!
Can you screenshot your switch and variable settings?
i can't read that but it looks like your using a common event with a switch,
which means the 'trigger' is set to autorun or parallel.
(guessing parallel since you can open the menu again after)
and it doesn't look like the common event is turning that switch off. meaning the event is looping constantly until it gets turned off.
@Tiamat-86 I'm using common parallel event with a switch. Yeah that switch is the main problem
I've figured it out, thank you so much!!

Original thread: https://forums.rpgmakerweb.com/threads/questions-about-variable-effects-item.140793/