[Solved]"Missing required positional arguments"

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
Doeny
Regular
Posts: 145
Joined: Wed Sep 07, 2022 8:28 pm
Contact:

[Solved]"Missing required positional arguments"

#1 Post by Doeny »

So the issue is my code looks like that:

Code: Select all

label time_config(time_start, time_max, interval):

    $ time_start = time_start
    $ time_max = time_max
    $ interval = interval
but I'm still getting an error saying "TypeError: Missing required positional arguemnts: 'time_start', 'time_max', 'interval'
What did I do wrong here?
Last edited by Doeny on Tue Nov 22, 2022 7:08 am, edited 3 times in total.

span4ev
Regular
Posts: 105
Joined: Fri Jul 08, 2022 9:29 pm
itch: rpymc
Contact:

Re: "Missing required positional arguments"

#2 Post by span4ev »

Show the code where you pass these arguments to label when you call it. Most likely they are not passed to label time_config

Code: Select all

label time_config(args):

    '[time_start]'
    '[time_max]'
    '[interval]'

label start:

    $ time_start = 110
    $ time_max = 220
    $ interval = 330
    call time_config([time_start,time_max,interval])

Doeny
Regular
Posts: 145
Joined: Wed Sep 07, 2022 8:28 pm
Contact:

Re: "Missing required positional arguments"

#3 Post by Doeny »

span4ev wrote: Mon Nov 21, 2022 8:21 am Show the code where you pass these arguments to label when you call it. Most likely they are not passed to label time_config

Code: Select all

label time_config(args):

    '[time_start]'
    '[time_max]'
    '[interval]'

label start:

    $ time_start = 110
    $ time_max = 220
    $ interval = 330
    call time_config([time_start,time_max,interval])
Ok nvm, I got it. Just accidentally copied the wrong line

Post Reply

Who is online

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