Merry sunday people. I’ve been trying to study Pickles today in Python and I had this small strip of code which I’m having a slight problem with. I’m using Ubuntu and Blender 2.62.
I keep getting error: line 16
scores = pickle.load(f)
def loadscores(): import bge import pickle import os logic = bge.logic filename = "scores.save" file = os.path.join(bge.logic.expandPath("//assets/python/"),filename) name = "Matti" score = 3400 data = [name, score] with open(file, 'wb') as f: pickle.dump(data, f) scores = pickle.load(f) print(scores)