variables in python

i wanna make variables… but dont knwo how :slight_smile:
i did that example:


cont = GameLogic.getCurrentController()
own = cont.owner
sensor = cont.sensors['sensor']
x = own['level']

scene = GameLogic.getCurrentScene()
objects = scene.objects
gaga = objects['OBgaga']
if sensor.positive:
 GameLogic.sendMessage( 'x' , '' , '')
 own.endObject()

but it sends message “x” not the x variable (the count, which allways changin, if the level changes)
than i did that:


cont = GameLogic.getCurrentController()
own = cont.owner
sensor = cont.sensors['sensor']
x = own['level']

scene = GameLogic.getCurrentScene()
objects = scene.objects
gaga = objects['OBgaga']
if sensor.positive:
 GameLogic.sendMessage( x , '' , '')
 own.endObject()

with this my python doesnt work, becouse my spehere does not dissapearing.
please help with variables :slight_smile: i need to send to everybody the message, which means the “x” - the variable.
if for example i have property “level” by 2, than my x should be same =2.
and than i need that sphere would send message to all “2”, not the “x” letter :slight_smile:
hope you understand :slight_smile:

got answer in nystic.com faster than here… and here is more blender players as i know…

there says instead of ‘x’ need write string(x) - and it works.