|
Post by JC on Jun 22, 2017 11:52:58 GMT -6
Hi all,
It keeps saying "invalid syntax" when I'm working on my camp scripts. I believe I've spelled everything correctly, but it makes me have to keep starting over. Anyone have this problem and if so, how did you fix it?
|
|
|
Post by _GrimmCreeper_ on Jun 22, 2017 11:54:01 GMT -6
Could you please post a picture of the error, and your script?
|
|
|
Post by spohnz on Jun 22, 2017 12:07:07 GMT -6
Also make sure you are using version 3 for the camp scripts.
|
|
thepifanatic
New Member
pi is awsome people have calculated it past 1 million digits
Posts: 41
|
Post by thepifanatic on Jul 17, 2017 15:54:20 GMT -6
i am getting an error when i try to call some pickled lists for a save game feature for a typing game
Traceback (most recent call last): File "C:\Users\Liam Crowley\Desktop\all files\toby\typing training folder\TYPSTER_MASTER_TRAING.py", line 118, in <module> list(lgd) TypeError: 'int' object is not iterable
the code that it uses is below
pln=1
def pln_changer1():
#player level number pluser
plnp=pln+1
wl[w]=str(plnp)
sf1=open("tmtd.dat", "wb")
pickle.dump(pln, sf1)
sf1.close()
def pln_changer2():
#player level number reseter
plnr=1
wl[w]=str(plnm)
sf2=open("tmtd.dat", "wb")
pickle.dump(pln, sf2)
sf2.close()
print(" Please type name of profile you wish to create")
w=input('Name of profile here: ')
wl={w : pln}
sf3=open("tmtd.dat", "wb")
pickle.dump(wl, sf3)
sf3.close()
lf=open('tmtd.dat', 'rb')
lgd=pickle.load(lf)
list(lgd)
|
|