import gamesystem
from gamesystem import baits
import gamestats
import bge
data = gamestats.data()
def load():
data.loadBait()
def save():
data.saveBait()
def execute(cont):
own = cont.owner
if not "ini" in own:
own["ini"] = True
load()
baits.bait = data.bait ### HERE!!!
else:
data.bait = baits.bait
save()
Here you see a code I have made to get the data, load it and save it. The load and sace script, aswell as gamesystem(alternate, better way for globalDict) works fine, but this script doesn’t act as it sohould. I have added comment to show you which line of code doesn’t work. Basicly - if file loads 3, and I do that action, the bait is set to 1 anyway. I need solution here.