Functions with parameters

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Message
Author
monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#16 Post by monele »

Works well enough indeed ^.^. Thanks a lot.

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#17 Post by monele »

And back to the python scene calling :

Code: Select all

    $ renpy.with(None)
    $ renpy.scene()
    $ spf = "spacefield1 dis"
    $ renpy.show(spf.split())
    $ renpy.with(dissolve)
gives

Code: Select all

-- Full Traceback ------------------------------------------------------------

  File "renpy\bootstrap.pyo", line 76, in bootstrap
  File "renpy\main.pyo", line 226, in main
  File "renpy\main.pyo", line 151, in run
  File "renpy\execution.pyo", line 76, in run
  File "renpy\ast.pyo", line 322, in execute
  File "renpy\python.pyo", line 750, in py_exec_bytecode
  File "game/Intro.rpy", line 55, in <module>
  File "renpy\exports.pyo", line 631, in with
  File "renpy\display\core.pyo", line 862, in interact
  File "renpy\display\core.pyo", line 961, in interact_core
  File "renpy\display\layout.pyo", line 149, in predict
  File "renpy\display\image.pyo", line 115, in predict
  File "renpy\display\image.pyo", line 81, in find_target
TypeError: list objects are unhashable

The last script statement executed was on line 55 of game/Intro.rpy.

Ren'Py Version: Ren'Py 5.3.3
EDIT :

This works :

Code: Select all

    $ renpy.with(None)
    $ renpy.scene()
    $ spf = ("spacefield1","dis")
    $ renpy.show(spf)
    $ renpy.with(dissolve)
Does this mean I have to make the images I want to use with this have multiple words names ?

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#18 Post by PyTom »

Code: Select all

    $ renpy.with(None)
    $ renpy.scene()
    $ spf = "spacefield1 dis"
    $ renpy.show(tuple(spf.split()))
    $ renpy.with(dissolve)

Fixes that.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#19 Post by monele »

Alright! Phew ^.^. Now I'm using Animation for the blinking stuff and I have two labels to call to make the grid map appear or disappear, the disappearing one redisplaying the old scene thanks to a variable. All good :D. Thanks for all these details... until next time, same Ren'Py channel!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], MisterPinetree