Error with phone message code

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
margaretcatter
Regular
Posts: 44
Joined: Fri May 18, 2018 7:16 pm
Projects: Kathelm Princess X Princess | Hurricane Like Me
itch: margaretcatter
Location: New York/LA
Contact:

Error with phone message code

#1 Post by margaretcatter »

Using this code viewtopic.php?f=51&t=40245&p=493223#p493223 and I'm trying to just make a back and forth simple text exchange. Below is my little bit of code.

Code: Select all

call phone_start

call message_start ("Karla", "Why don’t you have a lock on your phone? That’s like phone having 101 right here.")
call reply_message ("Eir", "Because it takes too long geez. Sometimes people are lazy aka mme and all I want to do is swipe and there it is. No fuss no muss.")
call message ("Karla", "Christ, how are you an adult?")
call reply_message ("Eir", "I ask myself that every day. One day I’m going to look up and realize I’m thirty and have no idea how that happened to me.")
call message("Karla", "It happens to the best of us.")
call reply_message("Karla", "Anyway i guess it’s a good thing that you don’t lock your phone. Also that in the year of twenty seventeen you have a landline. Like who even has one of those.")
call message("Eir" "It came with the apartment and its connected to my bell")
call reply_message("Karla" "I’m not judging its handy dandy for this exact moment.")
And this is the error I'm getting. I'm not sure what I'm doing wrong and google the error isnt giving me anything I can understand.

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 394, in script call
    call reply_message ("Eir", "Because it takes too long geez. Sometimes people are lazy aka mme and all I want to do is swipe and there it is. No fuss no muss.")
  File "game/options.rpy", line 319, in script
    label reply_message(what):
Exception: Too many arguments in call (expected 1, got 2).

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

Full traceback:
  File "game/script.rpy", line 394, in script call
    call reply_message ("Eir", "Because it takes too long geez. Sometimes people are lazy aka mme and all I want to do is swipe and there it is. No fuss no muss.")
  File "game/options.rpy", line 319, in script
    label reply_message(what):
  File "/Applications/renpy-6.99.14.3-sdk/renpy/ast.py", line 803, in execute
    values = apply_arguments(self.parameters, renpy.store._args, renpy.store._kwargs)
  File "/Applications/renpy-6.99.14.3-sdk/renpy/ast.py", line 152, in apply_arguments
    return parameters.apply(args, kwargs, ignore_errors)
  File "/Applications/renpy-6.99.14.3-sdk/renpy/ast.py", line 134, in apply
    raise Exception("Too many arguments in call (expected %d, got %d)." % (len(self.positional), len(args)))
Exception: Too many arguments in call (expected 1, got 2).

Darwin-16.6.0-x86_64-i386-64bit
Ren'Py 7.0.0.196
Hurricane Like Me 0.1
Sat Aug 11 23:03:22 2018

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: Error with phone message code

#2 Post by Per K Grok »

According to the error message reply_message only takes a what-argument

It would appear that instead of
call reply_message("person","message")

you should do
call reply_message("message")

User avatar
margaretcatter
Regular
Posts: 44
Joined: Fri May 18, 2018 7:16 pm
Projects: Kathelm Princess X Princess | Hurricane Like Me
itch: margaretcatter
Location: New York/LA
Contact:

Re: Error with phone message code

#3 Post by margaretcatter »

I figured it out. I had to change something in the screens page :D

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], Majestic-12 [Bot]