Showsni wrote:Looks like you're missing a bunch of commas in your image map code; put one after every hotspot.
As for the money, there are several ways to do it...
Something like, adding
$ current_money = my_inventory.money
$ ui.text(current_money)
somewhere between the ui.vbox and the ui.close should work, I think... Or, add a new vbox with whatever coordinates you want to put it in. Or you could have it as a textbutton that does something when you click it, or as an image depending on how much money you have...
Thanks alot my shop is now working!
Only problem is with the inventory and show money, i have put
Code: Select all
label inventory:
$ show_button=False
$ ui.vbox(xalign=.5)
if treasure1:
$ ui.imagebutton("treasure1.jpg", "treasure1_hover.jpg",clicked=ui.callsinnewcontext('see_treasure1'))
else:
$ ui.imagebutton("inventory.jpg", "inventory.jpg")
$ current_money = my_inventory.money
$ ui.text((current_money))
$ ui.textbutton('Return to game', clicked=ui.jumps('return_to_game'))
$ ui.close()
$ ui.interact()
and now i keep getting:
Code: Select all
I'm sorry, but an exception occured while executing your Ren'Py
script.
TypeError: 'int' object is not iterable
While running game code:
- script at line 65 of O:\Program Files\Ren'py\renpy-6.10.2\Blue Rain/game/script.rpy
- script at line 181 of O:\Program Files\Ren'py\renpy-6.10.2\Blue Rain/game/script.rpy
- python at line 181 of O:\Program Files\Ren'py\renpy-6.10.2\Blue Rain/game/script.rpy.
-- Full Traceback ------------------------------------------------------------
File "renpy-6.10.2/renpy/bootstrap.py", line 260, in bootstrap
File "renpy-6.10.2/renpy/main.py", line 310, in main
File "renpy-6.10.2/renpy/main.py", line 93, in run
File "renpy-6.10.2/renpy/execution.py", line 234, in run
File "renpy-6.10.2/renpy/ast.py", line 341, in execute
File "renpy-6.10.2/renpy/exports.py", line 539, in say
File "renpy-6.10.2/renpy/character.py", line 565, in __call__
File "renpy-6.10.2/renpy/character.py", line 524, in do_display
File "renpy-6.10.2/renpy/character.py", line 338, in display_say
File "O:\Program Files\Ren'py\renpy-6.10.2\renpy\ui.py", line 70, in interact
File "O:\Program Files\Ren'py\renpy-6.10.2\renpy\display\core.py", line 1578, in interact
File "O:\Program Files\Ren'py\renpy-6.10.2\renpy\display\core.py", line 2072, in interact_core
File "renpy-6.10.2/renpy/display/layout.py", line 647, in event
File "renpy-6.10.2/renpy/display/layout.py", line 647, in event
File "renpy-6.10.2/renpy/display/layout.py", line 647, in event
File "renpy-6.10.2/renpy/display/behavior.py", line 460, in event
File "renpy-6.10.2/renpy/curry.py", line 38, in __call__
File "renpy-6.10.2/renpy/game.py", line 292, in call_in_new_context
File "renpy-6.10.2/renpy/execution.py", line 234, in run
File "renpy-6.10.2/renpy/ast.py", line 558, in execute
File "O:\Program Files\Ren'py\renpy-6.10.2\renpy\python.py", line 937, in py_exec_bytecode
File "O:\Program Files\Ren'py\renpy-6.10.2\Blue Rain/game/script.rpy", line 181, in <module>
File "O:\Program Files\Ren'py\renpy-6.10.2\renpy\ui.py", line 194, in text
File "renpy-6.10.2/renpy/display/text.py", line 689, in __init__
File "renpy-6.10.2/renpy/display/text.py", line 729, in update
File "renpy-6.10.2/renpy/display/text.py", line 348, in input_tokenizer
TypeError: 'int' object is not iterable
While running game code:
- script at line 65 of O:\Program Files\Ren'py\renpy-6.10.2\Blue Rain/game/script.rpy
- script at line 181 of O:\Program Files\Ren'py\renpy-6.10.2\Blue Rain/game/script.rpy
- python at line 181 of O:\Program Files\Ren'py\renpy-6.10.2\Blue Rain/game/script.rpy.
Ren'Py Version: Ren'Py 6.10.2e