# http://www.renpy.org/doc/html/python.html#other-named-storesinitpythoninmystore:serial_number=0defserial():# global variable in mystore's scopeglobalserial_numberserial_number+=1returnserial_numberinitpython:importstore.mystoreasmystore# Set serial number outside of mystoreserial_number=999labelstart:# Should be 999"serial_number: [serial_number]"$serial_mystore=mystore.serial_number# Should be 0"Serial in mystore: [serial_mystore]"$serial_number=mystore.serial()# Should be 1?"Call mystore.serial(). serial_number: [serial_number]"
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.