[Solved]Expected a keyword argument or child statement.

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.
Post Reply
Message
Author
User avatar
TsukiWorks
Regular
Posts: 27
Joined: Sat Jun 23, 2018 6:50 am
Projects: The Misunderstood
Deviantart: TsukiWorks
Contact:

[Solved]Expected a keyword argument or child statement.

#1 Post by TsukiWorks »

Hello! I tried creating a screen which has two imagebuttons that when clicked will lead to two different labels. I also added a variable. And I am getting this error.
Here is a piece of my code:

Code: Select all

default rightArg = True 

screen textArg1():
    modal True 
    imagebutton:
        at q 
        idle "images/uright.png"
        hover (im.MatrixColor("uright.png", im.matrix.brightness(0.15)))
        focus_mask True
        action Jump("uRight")
        $ rightArg = True
        
    imagebutton:
        at q1
        idle "images/uwrong.png"
        hover (im.MatrixColor("uwrong.png", im.matrix.brightness(0.15)))
        focus_mask True
        action Jump("uWrong")
        $ rightArg = False
label start:
    call screen textArg1()

    $ renpy.pause()

    hide screen textArg1

    if rightArg == True:
        label uRight:
            k "Why do you think it's right?"
    else:
        label uWrong:
            k "Why do you think it's wrong?"
I will appreciate any help. Thanks in advance!
Attachments
error1.png
Last edited by TsukiWorks on Sat Dec 08, 2018 8:55 am, edited 1 time in total.

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: Expected a keyword argument or child statement.

#2 Post by Per K Grok »

TsukiWorks wrote: Sat Dec 08, 2018 7:13 am Hello! I tried creating a screen which has two imagebuttons that when clicked will lead to two different labels. I also added a variable. And I am getting this error.
Here is a piece of my code:

Code: Select all

default rightArg = True 

screen textArg1():
    modal True 
    imagebutton:
        at q 
        idle "images/uright.png"
        hover (im.MatrixColor("uright.png", im.matrix.brightness(0.15)))
        focus_mask True
        action Jump("uRight")
        $ rightArg = True
        
        ------
  
Try this

action [Jump("uRight"), SetVariable("rightArg", True)]

User avatar
TsukiWorks
Regular
Posts: 27
Joined: Sat Jun 23, 2018 6:50 am
Projects: The Misunderstood
Deviantart: TsukiWorks
Contact:

Re: Expected a keyword argument or child statement.

#3 Post by TsukiWorks »

Per K Grok wrote: Sat Dec 08, 2018 8:49 am
TsukiWorks wrote: Sat Dec 08, 2018 7:13 am Hello! I tried creating a screen which has two imagebuttons that when clicked will lead to two different labels. I also added a variable. And I am getting this error.
Here is a piece of my code:

Code: Select all

default rightArg = True 

screen textArg1():
    modal True 
    imagebutton:
        at q 
        idle "images/uright.png"
        hover (im.MatrixColor("uright.png", im.matrix.brightness(0.15)))
        focus_mask True
        action Jump("uRight")
        $ rightArg = True
        
        ------
  
Try this

action [Jump("uRight"), SetVariable("rightArg", True)]
Thank you so much! It worked!

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]