I am expanding the functionality of my RPS game and have come across this not always reproducible bug that I just don't understand.
I first came across this bug when I noticed that the quick menu stays on screen when it shouldn't if a player shows certain screens.
So to begin with, here's the error I am receiving.
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 208, in <module>
ValueError: list.remove(x): x not in list
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "script.rpyc", line 208, in script
File "/data/user/0/com.imperf3ktsoft.rpsv2/files/renpy/ast.py", line 881, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "/data/user/0/com.imperf3ktsoft.rpsv2/files/renpy/python.py", line 1913, in py_exec_bytecode
exec bytecode in globals, locals
File "game/script.rpy", line 208, in <module>
File "/data/user/0/com.imperf3ktsoft.rpsv2/files/renpy/python.py", line 713, in do_mutation
return method(self, *args, **kwargs)
ValueError: list.remove(x): x not in list
The files are all just standard .rpy files. And here's the apk
https://mega.nz/#!Bd0nFCQL!IfVhdZeZKIuk ... fsvPdbbGKo
To get the error, a certain sequence of events must be followed.
First, I need to make a selection, "rock", "paper" or "scissors"
This should jump to the results label after evaluating the result as win, tie or lose.
If I press the hint button here, this will jump to the hintacc label.
Pressing return will jump me to label hinted. After this, pressing any of the buttons in screen rps_selection, triggers the error. It doesn't always happen though, sometimes it takes two or three tries.
I'm a bit confused and not sure how this works right now (I wrote it but don't understand it lol)
Can anyone point out why this is happening and if there's a better way to handle this.
I also feel theres a better way to handle the function of hint40, hint60 and hint80 labels.