Code: Select all
init python:
if not persistent.set_volumes:
persistent.set_volumes = True
_preferences.volumes['music'] *= .50
I don't understand why it won't work if I delete persistent data and then run the game? It will work if I remove the code, open the game, don't set the volume, then put it in the code. If there is a better way to do this, or a fix I would love to know!
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/Code/variables.rpy", line 698, in script
init python:
File "game/Code/variables.rpy", line 704, in <module>
_preferences.volumes['music'] *= .50
KeyError: u'music'
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/Code/variables.rpy", line 698, in script
init python:
File "C:\Users\barnh\Desktop\renpy-6.99.13-sdk\renpy\ast.py", line 848, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "C:\Users\barnh\Desktop\renpy-6.99.13-sdk\renpy\python.py", line 1804, in py_exec_bytecode
exec bytecode in globals, locals
File "game/Code/variables.rpy", line 704, in <module>
_preferences.volumes['music'] *= .50
KeyError: u'music'
Windows-8-6.2.9200
Ren'Py 6.99.14.3135