Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/park.rpy", line 20, in script
$player_energy-=25
File "game/park.rpy", line 20, in <module>
$player_energy-=25
TypeError: unsupported operand type(s) for -=: 'unicode' and 'int'
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/park.rpy", line 20, in script
$player_energy-=25
File "C:\Users\M\Desktop\renpy-6.99.14.1-sdk\renpy\ast.py", line 848, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "C:\Users\M\Desktop\renpy-6.99.14.1-sdk\renpy\python.py", line 1812, in py_exec_bytecode
exec bytecode in globals, locals
File "game/park.rpy", line 20, in <module>
$player_energy-=25
TypeError: unsupported operand type(s) for -=: 'unicode' and 'int'
Windows-8-6.2.9200
Ren'Py 6.99.14.1.3218
S M Dating Sim 1.0
Tue Mar 06 00:06:27 2018
And the code looks like that:
Code: Select all
label park:
screen park
menu park_activities:
"What would you like to do here?"
"Go jogging! (-25 energy)":
"That was some intense jogging session! Your strenght has increased by 5!"
$us_strenght += 5
$player_energy=-25
jump park
"Read some book (-25 energy)":
"Reading is always profitable for the brain! Your knowledge has increased by 5!"
$us_knowledge += 5
$player_energy-=25
jump park
"Pick up the polluting trash! (-25 energy)":
"You spend some time on cleaning the park! Your goodness has increased by 5!"
$us_good += 5
$player_energy-=25
jump park
"Nothing":
jump tokyo_city
In case that's needed, here goes a part with the stats definition.
Code: Select all
define player_energy = "Energy"
define player_energy_min = 0
define player_energy_max = 100
if player_energy = 0:
"You need to go to sleep, you have no energy left!"
default us_beauty = 5
default us_good = 7
default us_knowledge = 3
default us_strenght = 4
default us_beauty_max = 1000
default us_good_max = 1000
default us_knowledge_max = 1000
default us_strenght_max = 1000