"Call" function not defined

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
Cristiander
Regular
Posts: 28
Joined: Sat Mar 04, 2017 8:19 am
Contact:

"Call" function not defined

#1 Post by Cristiander » Sat Jan 13, 2018 7:00 am

I made a button that is meant to call a label and I get the error that my call function is not defined.

The code for the button is:

Code: Select all

screen Info_button:
    imagebutton:
        idle  im.Scale("gui/rpg/info_action.png", 50, 50)
        hover im.Scale("gui/rpg/info_idle.png", 50, 50)
        action Call("Label_info")
But I get the error:

Code: Select all


NameError: name 'Call' is not defined

I really don't understand how that can happen. I put Jump instead of call and it worked. Am I overlooking something?

User avatar
Remix
Miko-Class Veteran
Posts: 927
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I cannot draw very well)
Projects: An un-named 3d anime based trainer game
Contact:

Re: "Call" function not defined

#2 Post by Remix » Sat Jan 13, 2018 10:09 am

Certainly looks like a proper script part here. Is the traceback definitely referencing that particular Call? Could you provide the full trace?

User avatar
Ocelot
Miko-Class Veteran
Posts: 849
Joined: Tue Aug 23, 2016 10:35 am
Skype: miinipaa
Contact:

Re: "Call" function not defined

#3 Post by Ocelot » Sat Jan 13, 2018 10:42 am

Are you sure that your RenPy version is Ren'Py 6.99.14?
< < insert Rick Cook quote here > >

Cristiander
Regular
Posts: 28
Joined: Sat Mar 04, 2017 8:19 am
Contact:

Re: "Call" function not defined

#4 Post by Cristiander » Sat Jan 13, 2018 4:37 pm

I am running Renpy 6.99.13.2919. I checked for updates and this is the version I got.

Now the error says "Name error: global name "From_current" is not defined

Full path is this:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script - maleficent.rpy", line 488, in script
    nvl_n "Wow! What the hell is this?!"
  File "renpy/common/00nvl_mode.rpy", line 339, in do_display
    **display_args)
  File "game/script - sprites.rpy", line 104, in execute
    screen maleficent_info_b:
  File "game/script - sprites.rpy", line 104, in execute
    screen maleficent_info_b:
  File "game/script - sprites.rpy", line 105, in execute
    imagebutton:
  File "game/script - sprites.rpy", line 105, in keywords
    imagebutton:
  File "renpy/common/00action_control.rpy", line 95, in __init__
    self.from_current = from_current
NameError: global name 'from_current' is not defined

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

Full traceback:
  File "game/script - maleficent.rpy", line 488, in script
    nvl_n "Wow! What the hell is this?!"
  File "C:\Program Files\renpy-6.99.12.4-sdk\renpy\ast.py", line 624, in execute
    renpy.exports.say(who, what, interact=self.interact, *args, **kwargs)
  File "C:\Program Files\renpy-6.99.12.4-sdk\renpy\exports.py", line 1173, in say
    who(what, *args, **kwargs)
  File "C:\Program Files\renpy-6.99.12.4-sdk\renpy\character.py", line 911, in __call__
    self.do_display(who, what, cb_args=self.cb_args, **display_args)
  File "renpy/common/00nvl_mode.rpy", line 339, in do_display
    **display_args)
  File "C:\Program Files\renpy-6.99.12.4-sdk\renpy\character.py", line 523, in display_say
    rv = renpy.ui.interact(mouse='say', type=type, roll_forward=roll_forward)
  File "C:\Program Files\renpy-6.99.12.4-sdk\renpy\ui.py", line 287, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "C:\Program Files\renpy-6.99.12.4-sdk\renpy\display\core.py", line 2553, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
  File "C:\Program Files\renpy-6.99.12.4-sdk\renpy\display\core.py", line 2821, in interact_core
    root_widget.visit_all(lambda i : i.per_interact())
  File "C:\Program Files\renpy-6.99.12.4-sdk\renpy\display\core.py", line 495, in visit_all
    d.visit_all(callback)
  File "C:\Program Files\renpy-6.99.12.4-sdk\renpy\display\core.py", line 495, in visit_all
    d.visit_all(callback)
  File "C:\Program Files\renpy-6.99.12.4-sdk\renpy\display\core.py", line 495, in visit_all
    d.visit_all(callback)
  File "C:\Program Files\renpy-6.99.12.4-sdk\renpy\display\screen.py", line 401, in visit_all
    callback(self)
  File "C:\Program Files\renpy-6.99.12.4-sdk\renpy\display\core.py", line 2821, in <lambda>
    root_widget.visit_all(lambda i : i.per_interact())
  File "C:\Program Files\renpy-6.99.12.4-sdk\renpy\display\screen.py", line 411, in per_interact
    self.update()
  File "C:\Program Files\renpy-6.99.12.4-sdk\renpy\display\screen.py", line 580, in update
    self.screen.function(**self.scope)
  File "game/script - sprites.rpy", line 104, in execute
    screen maleficent_info_b:
  File "game/script - sprites.rpy", line 104, in execute
    screen maleficent_info_b:
  File "game/script - sprites.rpy", line 105, in execute
    imagebutton:
  File "game/script - sprites.rpy", line 105, in keywords
    imagebutton:
  File "<screen language>", line 114, in <module>
  File "renpy/common/00action_control.rpy", line 95, in __init__
    self.from_current = from_current
NameError: global name 'from_current' is not defined

Windows-8-6.2.9200
Ren'Py 6.99.13.2919
Nicob's Adventure

User avatar
Ocelot
Miko-Class Veteran
Posts: 849
Joined: Tue Aug 23, 2016 10:35 am
Skype: miinipaa
Contact:

Re: "Call" function not defined

#5 Post by Ocelot » Sat Jan 13, 2018 6:20 pm

IIRC, you need to rebuild your game after upgrading, there were changes in RenPy internals, so old bytecode will not work.
< < insert Rick Cook quote here > >

Cristiander
Regular
Posts: 28
Joined: Sat Mar 04, 2017 8:19 am
Contact:

Re: "Call" function not defined

#6 Post by Cristiander » Sat Jan 13, 2018 7:31 pm

Ocelot wrote:
Sat Jan 13, 2018 6:20 pm
IIRC, you need to rebuild your game after upgrading, there were changes in RenPy internals, so old bytecode will not work.
Yeah most likely. But for now I need to focus on the screen I'm trying to make.

Is there a tutorial on how to make a button? I really don't understand how the action parameter is supposed to work.
I'm trying to give it the call and it's not working. I try to give it the show and it's not working. I really don't get it.

User avatar
Tayruu
Regular
Posts: 100
Joined: Sat Jul 05, 2014 7:57 pm

Re: "Call" function not defined

#7 Post by Tayruu » Sat Jan 13, 2018 10:09 pm

This seems to be a bug, as other people have had similar problems, as seen here, and in the linked thread.
viewtopic.php?f=32&t=47069

Post Reply

Who is online

Users browsing this forum: No registered users