Do globals work?

My script

import GameLogic

Controller = GameLogic.getCurrentController()
Owner = Controller.getOwner()

Shoot = Controller.getSensor("Shoot")
NoShoot = Controller.getSensor("NoShoot")

GameLogic.Ammo = 200

Bullet = Controller.getActuator("Bullet")
Recoil = Controller.getActuator("Recoil")
Sound = Controller.getActuator("Sound")
Slide2 = Controller.getActuator("Slide2")
Slide = Controller.getActuator("Slide")
Waste = Controller.getActuator("Waste")

if Shoot.isPositive():
	GameLogic.addActiveActuator(Bullet, 1)
	GameLogic.addActiveActuator(Recoil, 1)
	GameLogic.addActiveActuator(Sound, 1)
	GameLogic.addActiveActuator(Slide2, 1)
	GameLogic.addActiveActuator(Slide, 1)
	GameLogic.addActiveActuator(Waste, 1)
	GameLogic.Ammo - 1
if NoShoot.isPositive():
	GameLogic.addActiveActuator(Bullet, 0)
	GameLogic.addActiveActuator(Recoil, 0)
	GameLogic.addActiveActuator(Sound, 0)
	GameLogic.addActiveActuator(Slide2, 0)
	GameLogic.addActiveActuator(Slide, 0)
	GameLogic.addActiveActuator(Waste, 0)

Doesn’t seem to be working. The only part I can see as a problem, is the GameLogic.Ammo = 200, does Blender Python scripting not support globals?

you have a problem in line 25
it should be

GameLogic.Ammo = GameLogic.Ammo - 1
import GameLogic

Controller = GameLogic.getCurrentController()
Owner = Controller.getOwner()

Shoot = Controller.getSensor("Shoot")
NoShoot = Controller.getSensor("NoShoot")

GameLogic.Ammo = 100

Bullet = Controller.getActuator("Bullet")
Recoil = Controller.getActuator("Recoil")
Sound = Controller.getActuator("Sound")
Slide2 = Controller.getActuator("Slide2")
Slide = Controller.getActuator("Slide")
Waste = Controller.getActuator("Waste")

if Shoot.isPositive() and GameLogic.Ammo >> 0:
	GameLogic.addActiveActuator(Bullet, 1)
	GameLogic.addActiveActuator(Recoil, 1)
	GameLogic.addActiveActuator(Sound, 1)
	GameLogic.addActiveActuator(Slide2, 1)
	GameLogic.addActiveActuator(Slide, 1)
	GameLogic.addActiveActuator(Waste, 1)
	GameLogic.Ammo = GameLogic.Ammo - 1
	
if NoShoot.isPositive():
	GameLogic.addActiveActuator(Bullet, 0)
	GameLogic.addActiveActuator(Recoil, 0)
	GameLogic.addActiveActuator(Sound, 0)
	GameLogic.addActiveActuator(Slide2, 0)
	GameLogic.addActiveActuator(Slide, 0)
	GameLogic.addActiveActuator(Waste, 0)

For some reason, this still isn’t accessing the Ammo property.

Ohh… Its because at the beginning of the script it says

GameLogic.Ammo = 100

so every time the script runs it sets Ammo to 100 to fix it have a property that == 0 then put

if owner.propname == 0:
    owner.propname = 1
    GameLogic.Ammo = 100