Code: Select all
define j = Character("Jhon", color="#c8ffc8")
label play_screen(imageName):
j "[imageName]"
pause 1
screen thumbnail:
add imageName xalign 0.5 yalign -0.1
modal False
show screen thumbnail with dissolve
return
label start:
j "Hello!"
call play_screen(imageName="thumbnail 01.png")
j "first thumbnail "
hide screen thumbnail with dissolve
call play_screen(imageName="thumbnail 02.png")
j "End"
return
Code: Select all
...
While running game code:
File "game/script.rpy", line 51, in script
File "game/script.rpy", line 41, in execute
File "game/script.rpy", line 41, in execute
File "game/script.rpy", line 42, in execute
NameError: name 'imageName' is not defined
-- Full Traceback ------------------------------------------------------------
...
File "/home/patrick/renpy-7.3.2-sdk/renpy/display/screen.py", line 625, in update
self.screen.function(**self.scope)
File "game/script.rpy", line 41, in execute
File "game/script.rpy", line 41, in execute
File "game/script.rpy", line 42, in execute
File "<screen language>", line 42, in <module>
NameError: name 'imageName' is not defined
Linux-4.15.0-20-generic-x86_64-with-debian-buster-sid
Ren'Py 7.3.2.320
Test 1.0
Sat Sep 14 15:17:44 2019
if i use imageName or [imageName] i have exactly the same message
if i use "imageName" it's run but just text appears.
And yet j "[imageName]" displays the name of the image well ...
If i use screen thumbnail(imageName):
it's return
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 51, in script
Exception: Required parameter imageName has no value.
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 51, in script
File "/home/patrick/renpy-7.3.2-sdk/renpy/ast.py", line 706, in execute
renpy.exports.say(who, what, *args, **kwargs)
File "/home/patrick/renpy-7.3.2-sdk/renpy/exports.py", line 1336, in say
who(what, *args, **kwargs)
File "/home/patrick/renpy-7.3.2-sdk/renpy/character.py", line 1139, in __call__
self.do_display(who, what, cb_args=self.cb_args, **display_args)
File "/home/patrick/renpy-7.3.2-sdk/renpy/character.py", line 842, in do_display
**display_args)
File "/home/patrick/renpy-7.3.2-sdk/renpy/character.py", line 591, in display_say
rv = renpy.ui.interact(mouse='say', type=type, roll_forward=roll_forward)
File "/home/patrick/renpy-7.3.2-sdk/renpy/ui.py", line 295, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "/home/patrick/renpy-7.3.2-sdk/renpy/display/core.py", line 2699, in interact
repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
File "/home/patrick/renpy-7.3.2-sdk/renpy/display/core.py", line 3091, in interact_core
root_widget.visit_all(lambda i : i.per_interact())
File "/home/patrick/renpy-7.3.2-sdk/renpy/display/core.py", line 541, in visit_all
d.visit_all(callback, seen)
File "/home/patrick/renpy-7.3.2-sdk/renpy/display/core.py", line 541, in visit_all
d.visit_all(callback, seen)
File "/home/patrick/renpy-7.3.2-sdk/renpy/display/core.py", line 541, in visit_all
d.visit_all(callback, seen)
File "/home/patrick/renpy-7.3.2-sdk/renpy/display/screen.py", line 430, in visit_all
callback(self)
File "/home/patrick/renpy-7.3.2-sdk/renpy/display/core.py", line 3091, in <lambda>
root_widget.visit_all(lambda i : i.per_interact())
File "/home/patrick/renpy-7.3.2-sdk/renpy/display/screen.py", line 440, in per_interact
self.update()
File "/home/patrick/renpy-7.3.2-sdk/renpy/display/screen.py", line 625, in update
self.screen.function(**self.scope)
File "/home/patrick/renpy-7.3.2-sdk/renpy/ast.py", line 158, in apply_arguments
return parameters.apply(args, kwargs, ignore_errors)
File "/home/patrick/renpy-7.3.2-sdk/renpy/ast.py", line 122, in apply
raise Exception("Required parameter %s has no value." % name)
Exception: Required parameter imageName has no value.
Linux-4.15.0-20-generic-x86_64-with-debian-buster-sid
Ren'Py 7.3.2.320
Test 1.0
Sat Sep 14 15:33:09 2019
with screen thumbnail([imageName]):
Code: Select all
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/script.rpy", line 41: expected 'name' not found.
screen thumbnail([imageName]):
^
Ren'Py Version: Ren'Py 7.3.2.320
Sat Sep 14 15:36:26 2019