script problem

I am new in python and blender, and i am Portuguese, so sorry for my bad english…

Is possible to save a variable value every time script is execute?

example:

x=0

x++

Next time script is execute variable x is 0 again and i want x= value of increment

Tanks

use GameLogic. before. This will make it a global variable.
GameLogic.X = 0

dont work for me. Every time sript is execute GameLogic is 0 and not the increment value:no:

 
if not hasattr(GameLogic,"X"): GameLogic.X = 0
 
GameLogic.X = GameLogic.X + 1

:cool:

Ok, now result :yes: tanks