Code: Select all
label chap1lunch:
"I have the money that Mom and that lady gave me..."
"%(yen)d yen left."
"What should I get from the cafeteria?"
menu:
"A drink" if yen.level >= 120:
"I got a drink. It's hot out today."
$yen.dec()
"I don't have enough money" if yen.level < 120:
"Nevermind."
"Maybe I should get a job?"
"Chocolate" if yen.level >= 102:
"I got some chocolate. Probably not the healthiest choice."
$yen.dec()
"I don't have enough money" if yen.level < 102:
"Nevermind."
"Maybe I should get a job?"
"Curry rice" if yen.level >= 656:
"I got some curry rice. It looks delicious."
$yen.dec()
"I don't have enough money" if yen.level < 656:
"Nevermind."
"Maybe I should get a job?"
"Ramen" if yen.level >= 550:
"I got some ramen noodles. They smell nice."
$yen.dec()
"I don't have enough money" if yen.level < 550:
"Nevermind."
"Maybe I should get a job?"
"Sushi" if yen.level >= 1226:
"I got some sushi. My favorite."
$yen.dec()
"I don't have enough money" if yen.level < 1226:
"Nevermind."
"Maybe I should get a job?"
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 694, in script
menu:
File "game/script.rpy", line 695, in <module>
"A drink" if yen.level >= 120:
AttributeError: 'int' object has no attribute 'level'
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 694, in script
menu:
File "/Applications/renpy-7.4.5-sdk/renpy/ast.py", line 1642, in execute
choice = renpy.exports.menu(choices, self.set, args, kwargs, item_arguments)
File "/Applications/renpy-7.4.5-sdk/renpy/exports.py", line 1028, in menu
condition = renpy.python.py_eval(condition)
File "/Applications/renpy-7.4.5-sdk/renpy/python.py", line 2249, in py_eval
return py_eval_bytecode(code, globals, locals)
File "/Applications/renpy-7.4.5-sdk/renpy/python.py", line 2242, in py_eval_bytecode
return eval(bytecode, globals, locals)
File "game/script.rpy", line 695, in <module>
"A drink" if yen.level >= 120:
AttributeError: 'int' object has no attribute 'level'
Darwin-20.3.0-x86_64-i386-64bit
Ren'Py 7.4.5.1648
Bukimi Ai 2.0
Sat Jul 17 20:34:07 2021