Mobile Phone Text Code Error Question

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
plaul2002
Newbie
Posts: 11
Joined: Fri Aug 31, 2018 4:52 pm
Contact:

Mobile Phone Text Code Error Question

#1 Post by plaul2002 »

I am getting the following error and it is killing me...

New to Renpy.

I don't fully understand the code in options which is hindering my ability to fix my problem. It also is tracing back to ast.py which makes me even more confused.

I am using Mobile phone text-message system found here https://nadianova.itch.io/phone-message ... -for-renpy

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 949, in script call
    call message("Abby", "Shoot me a text sometime if you need a cleaning!")
  File "game/options.rpy", line 121, in script
    label reply_message(what):
Exception: Required parameter what has no value.

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

Full traceback:
  File "game/script.rpy", line 949, in script call
    call message("Abby", "Shoot me a text sometime if you need a cleaning!")
  File "game/options.rpy", line 121, in script
    label reply_message(what):
  File "E:\Otter Fun\renpy-7.0.0-sdk\renpy\ast.py", line 841, in execute
    values = apply_arguments(self.parameters, renpy.store._args, renpy.store._kwargs)
  File "E:\Otter Fun\renpy-7.0.0-sdk\renpy\ast.py", line 158, in apply_arguments
    return parameters.apply(args, kwargs, ignore_errors)
  File "E:\Otter Fun\renpy-7.0.0-sdk\renpy\ast.py", line 122, in apply
    raise Exception("Required parameter %s has no value." % name)
Exception: Required parameter what has no value.

Windows-8-6.2.9200
Ren'Py 7.2.2.491
Banking 1.0
Sat Apr 20 23:33:54 2019
Here is my script code
call phone_start
# this brings up the message, first slot is the name, and second is the content
# notice how it has _start at the end, the first one is special as there are no delays before it. use this for the first message
call message_start("Abby", "Hey, awesome meeting you this morning!")
# added an alternate way to reply from the player perspective, this time the name doesnt show if you think its extra
call reply_message("You too!")
call message("Abby", "Shoot me a text sometime if you need a cleaning!")
call reply_message("Sounds good! Have a good day!")
call message_img("Abby", "You too!","images/abby_phone.png")

# this one puts away the phone!
call phone_end

#Here is my options code
label phone_end:
$ renpy.pause()
hide screen phone_message
hide screen phone_message2
hide screen phone_message3
hide screen phone_message4
hide screen phone_message5
hide screen phone_message6
hide screen phone_message7
hide screen phone_message8
hide screen phone_message_image
show phone at phone_hide
$ renpy.pause(0.2)
return

label message(who, what):
$ renpy.pause()
hide screen phone_message
hide screen phone_message2
hide screen phone_message3
hide screen phone_message4
hide screen phone_message5
hide screen phone_message6
hide screen phone_message7
hide screen phone_message8
hide screen phone_message_image
$ renpy.pause(0.1)
# if you want to change the players name to be something else than "me" you can change it here
#if who.lower() == "me":
#show screen phone_message2(who, what)
#else:
#show screen phone_message(who, what)
#return

label reply_message(what):
$ renpy.pause()
hide screen phone_message
hide screen phone_message2
hide screen phone_message3
hide screen phone_message4
hide screen phone_message5
hide screen phone_message6
hide screen phone_message7
hide screen phone_message8
hide screen phone_message_image
$ renpy.pause(0.1)
show screen phone_message3(what)
return

label message_img(who, what,img):
$ renpy.pause()
hide screen phone_message
hide screen phone_message2
hide screen phone_message3
hide screen phone_message4
hide screen phone_message5
hide screen phone_message6
hide screen phone_message7
hide screen phone_message8
hide screen phone_message_image
$ renpy.pause(0.1)
show screen phone_message_image(who, what,img)
return

label message_start(who, what):
# if you want to change the players name to be something else than "me" you can change it here
if who.lower() == "me":
show screen phone_message2(who, what)
else:
show screen phone_message(who, what)
return

plaul2002
Newbie
Posts: 11
Joined: Fri Aug 31, 2018 4:52 pm
Contact:

Re: Mobile Phone Text Code Error Question

#2 Post by plaul2002 »

Any help please?

rames44
Veteran
Posts: 233
Joined: Sun May 29, 2016 4:38 pm
Contact:

Re: Mobile Phone Text Code Error Question

#3 Post by rames44 »

The “return” at the end of the block that starts with “label message” is commented out. As a result, execution is falling thru to the label “reply_message.” That label has a parameter, which isn’t being given a “what” value because it’s not being “call”ed. Labels don’t “inherit” values from previous labels.

plaul2002
Newbie
Posts: 11
Joined: Fri Aug 31, 2018 4:52 pm
Contact:

Re: Mobile Phone Text Code Error Question

#4 Post by plaul2002 »

Thanks so much! What would be a solution?

User avatar
XxrenxX
Veteran
Posts: 267
Joined: Tue Oct 02, 2012 2:40 am
Projects: Chasing
Deviantart: bara-ettie
Location: Canada
Contact:

Re: Mobile Phone Text Code Error Question

#5 Post by XxrenxX »

plaul2002 wrote: Thu May 09, 2019 5:59 pm Thanks so much! What would be a solution?
remove the # in front of return

Post Reply

Who is online

Users browsing this forum: No registered users