VN Ren'Py Can someone help me solve problem with renpy script?

ZelvanInRow

Active Member
Sep 19, 2019
518
517
So i intend on porting this game called Full Service. I managed to port it last month with the previous version but now i intend to update it but i faced this problem where a sayer is not defined. I encountered this the last time i ported it too but i forgot how i fixed it and the old game file already removed.
Screenshot_1.png
Soo can anyone help me?
 

Porcus Dev

Engaged Member
Game Developer
Oct 12, 2017
2,582
4,688
So i intend on porting this game called Full Service. I managed to port it last month with the previous version but now i intend to update it but i faced this problem where a sayer is not defined. I encountered this the last time i ported it too but i forgot how i fixed it and the old game file already removed.
View attachment 638076
Soo can anyone help me?
You need to define the character:


For example:
Python:
define tomoki = Character("Tomoki", color="#009900", what_color="#009900")
 

ZelvanInRow

Active Member
Sep 19, 2019
518
517
You need to define the character:


For example:
Python:
define tomoki = Character("Tomoki", color="#009900", what_color="#009900")
It should already be defined i think because this error only happen on android port, the game when played on pc is fine.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,265
15,075
Well...
[char_pc.rpy]
Code:
init -2:

    if renpy.variant("pc"):

        define tomoki = Character(
            None,
            window_background = Frame("images/gui/scene/text_tomoki.png", 1920, 342),
            window_xminimum = 1920,
            window_xmaximum = 1920,
            window_yminimum = 342,
            window_ymaximum = 342,
            window_xpos = 0.5,
            window_left_padding = 0,
            window_top_padding = 80,
            what_font = "fonts/candara.ttf",
            what_size = 30,
            what_xmaximum = 1100,
            ctc=anim.Blink("images/gui/scene/textctc.png"), image="tomoki"
        )
[...]
[char_small.rpy]
Code:
# label characters_small:

#     if renpy.variant("small"):

#         define tomoki = Character(
#             None,
#             window_background = Frame("images/gui/scene/text_tomoki.png", 1920, 342),
#             window_xminimum = 1920,
#             window_xmaximum = 1920,
#             window_yminimum = 342,
#             window_ymaximum = 342,
#             window_xpos = 0.5,
#             window_left_padding = 275,
#             window_top_padding = 80,
#             what_font = "fonts/candara.ttf",
#             what_size = 30,
#             what_xmaximum = 1100,
#             ctc=anim.Blink("images/gui/scene/textctc.png"), image="tomoki"
#         )
[...]
If you wonder, yes, there's absolutely no differences between the two, except that he fully commented the second.


So, remove the if from "char_pc.rpy", and you'll be good.
 

ZelvanInRow

Active Member
Sep 19, 2019
518
517
Well...
[char_pc.rpy]
Code:
init -2:

    if renpy.variant("pc"):

        define tomoki = Character(
            None,
            window_background = Frame("images/gui/scene/text_tomoki.png", 1920, 342),
            window_xminimum = 1920,
            window_xmaximum = 1920,
            window_yminimum = 342,
            window_ymaximum = 342,
            window_xpos = 0.5,
            window_left_padding = 0,
            window_top_padding = 80,
            what_font = "fonts/candara.ttf",
            what_size = 30,
            what_xmaximum = 1100,
            ctc=anim.Blink("images/gui/scene/textctc.png"), image="tomoki"
        )
[...]
[char_small.rpy]
Code:
# label characters_small:

#     if renpy.variant("small"):

#         define tomoki = Character(
#             None,
#             window_background = Frame("images/gui/scene/text_tomoki.png", 1920, 342),
#             window_xminimum = 1920,
#             window_xmaximum = 1920,
#             window_yminimum = 342,
#             window_ymaximum = 342,
#             window_xpos = 0.5,
#             window_left_padding = 275,
#             window_top_padding = 80,
#             what_font = "fonts/candara.ttf",
#             what_size = 30,
#             what_xmaximum = 1100,
#             ctc=anim.Blink("images/gui/scene/textctc.png"), image="tomoki"
#         )
[...]
If you wonder, yes, there's absolutely no differences between the two, except that he fully commented the second.


So, remove the if from "char_pc.rpy", and you'll be good.
Thank you it works :)