Code: Select all
frame:
...
vbox:
yalign 0.5
textbutton "%s"%(choice1) style "choicez" action NullAction(), SetScreenVariable(Choice1_1, "True")
textbutton "%s"%(choice2) style "choicez" action NullAction(), SetScreenVariable(Choice1_2, "True")
showif Choice1_1:
Function[msg( "Pikachu")] #First Method I tried; doesn't work
showif Choice 1_2:
vbox: #This method doesn't seem to work either :(
textbutton _("button"):
action [msg("Pikachu")]
Code: Select all
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/Practice.rpy", line 40: u'Function' is not a keyword argument or valid child for the showif statement.
Function[msg( "Pikachu", "Pika pika Peeeee","charmander20.png", "textbox3.png", who=True )]
^
Ren'Py Version: Ren'Py 7.0.0.196
Thu Oct 18 08:00:59 2018
The error from the second method:
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 21, in script
python:
File "game/script.rpy", line 26, in <module>
msg("","",choice1="gagaga", choice2="rely on cuteness and beguile the old fart behind the counter and go aaa a a a a a a a a")
File "game/Practice.rpy", line 7, in msg
renpy.pause()
File "game/Practice.rpy", line 15, in execute
screen Part1:
File "game/Practice.rpy", line 15, in execute
screen Part1:
File "game/Practice.rpy", line 16, in execute
frame background Bak:
File "game/Practice.rpy", line 17, in execute
frame background None :
File "game/Practice.rpy", line 18, in execute
viewport:
File "game/Practice.rpy", line 20, in execute
vbox spacing 15:
File "game/Practice.rpy", line 22, in execute
for message in m_msg:
File "game/Practice.rpy", line 28, in execute
if image1:
File "game/Practice.rpy", line 38, in execute
showif Choice1_1:
File "game/Practice.rpy", line 39, in execute
vbox:
File "game/Practice.rpy", line 40, in execute
textbutton _("button"):
File "game/Practice.rpy", line 40, in keywords
textbutton _("button"):
TypeError: 'unicode' object is not callable
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 21, in script
python:
File "C:\Users\newmiracleeveryday\Desktop\renpy-6.99.14.3-sdk\renpy\ast.py", line 862, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "C:\Users\newmiracleeveryday\Desktop\renpy-6.99.14.3-sdk\renpy\python.py", line 1912, in py_exec_bytecode
exec bytecode in globals, locals
File "game/script.rpy", line 26, in <module>
msg("","",choice1="gagaga", choice2="rely on cuteness and beguile the old fart behind the counter and go aaa a a a a a a a a")
File "game/Practice.rpy", line 7, in msg
renpy.pause()
File "C:\Users\newmiracleeveryday\Desktop\renpy-6.99.14.3-sdk\renpy\exports.py", line 1330, in pause
rv = renpy.ui.interact(mouse='pause', type='pause', roll_forward=roll_forward)
File "C:\Users\newmiracleeveryday\Desktop\renpy-6.99.14.3-sdk\renpy\ui.py", line 287, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "C:\Users\newmiracleeveryday\Desktop\renpy-6.99.14.3-sdk\renpy\display\core.py", line 2649, in interact
repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
File "C:\Users\newmiracleeveryday\Desktop\renpy-6.99.14.3-sdk\renpy\display\core.py", line 3033, in interact_core
root_widget.visit_all(lambda i : i.per_interact())
File "C:\Users\newmiracleeveryday\Desktop\renpy-6.99.14.3-sdk\renpy\display\core.py", line 511, in visit_all
d.visit_all(callback)
File "C:\Users\newmiracleeveryday\Desktop\renpy-6.99.14.3-sdk\renpy\display\core.py", line 511, in visit_all
d.visit_all(callback)
File "C:\Users\newmiracleeveryday\Desktop\renpy-6.99.14.3-sdk\renpy\display\core.py", line 511, in visit_all
d.visit_all(callback)
File "C:\Users\newmiracleeveryday\Desktop\renpy-6.99.14.3-sdk\renpy\display\screen.py", line 424, in visit_all
callback(self)
File "C:\Users\newmiracleeveryday\Desktop\renpy-6.99.14.3-sdk\renpy\display\core.py", line 3033, in <lambda>
root_widget.visit_all(lambda i : i.per_interact())
File "C:\Users\newmiracleeveryday\Desktop\renpy-6.99.14.3-sdk\renpy\display\screen.py", line 434, in per_interact
self.update()
File "C:\Users\newmiracleeveryday\Desktop\renpy-6.99.14.3-sdk\renpy\display\screen.py", line 619, in update
self.screen.function(**self.scope)
File "game/Practice.rpy", line 15, in execute
screen Part1:
File "game/Practice.rpy", line 15, in execute
screen Part1:
File "game/Practice.rpy", line 16, in execute
frame background Bak:
File "game/Practice.rpy", line 17, in execute
frame background None :
File "game/Practice.rpy", line 18, in execute
viewport:
File "game/Practice.rpy", line 20, in execute
vbox spacing 15:
File "game/Practice.rpy", line 22, in execute
for message in m_msg:
File "game/Practice.rpy", line 28, in execute
if image1:
File "game/Practice.rpy", line 38, in execute
showif Choice1_1:
File "game/Practice.rpy", line 39, in execute
vbox:
File "game/Practice.rpy", line 40, in execute
textbutton _("button"):
File "game/Practice.rpy", line 40, in keywords
textbutton _("button"):
File "<screen language>", line 41, in <module>
TypeError: 'unicode' object is not callable
Windows-8-6.2.9200
Ren'Py 7.0.0.196
Practice 1.0
Thu Oct 18 07:57:25 2018