Here is what happens:
I type !save
I get the "The users have been saved" message
Can keep driving, insim works fine.
But:
If I restart insim (whether closing Python shell and starting insim again, or just hitting F5 to restart insim), I get an error, always relating to user vars:
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Python27\lib\threading.py", line 530, in __bootstrap_inner
self.run()
File "C:\Python27\lib\threading.py", line 734, in run
self.function(*self.args, **self.kwargs)
File "C:\Users\Jonathan\Desktop\Pyinsim New\examples\cruise.py", line 157, in heartbeat
draw_osd(insim, ncn)
File "C:\Users\Jonathan\Desktop\Pyinsim New\examples\cruise.py", line 110, in draw_osd
Text='^2Cash: $%d ^7| Total Distance: %.2f Km' % (ncn.vars.cash, ncn.vars.dist))
AttributeError: 'IS_NCN' object has no attribute 'cash'
Tried a second time, ended up being similar, but instead of being with the OSD, it was with adding money. Still, it always comes down to the user vars.
Note: This does not happen if I then disconnect before restarting insim. This issue will not happen in that case, but I'm trying to make it so people don't have to reconnect to have their stats saved while I'm working with the script.
My user file after using !save and restarting insim:
http://mr.learjet45.us/uploads/learjet45
User file after someone disconnects and has vars saved that way rather than with !save
http://mr.learjet45.us/uploads/fatcatpaddy