[Solved] Problem showing different texts

I’m trying to show diferent texts each time the player see an item again, but only after advancing in the story. For example: when the player see an useless item for the first time the game will show text_0 and after the player see the usefull item and advance to the next part, if the player saw the useless item again,it will show text_1. So far it’s ok, but i’m having trouble to show the text_0 after the player had already advanced through the story,but it’s seeing the item for the first time. The problem is, since the state is being called in the update function, it shows the text_0 in the first frame,but in the next frame the function is called again and it shows the text_1. I tried to add bolls to control the prints, i tried to put the state calling in another fuction, but all failed.

Here is a piece of the code:

http://pastebin.com/zUKTfyQx

I solved it by changing the item_view counter only when i click R to return.