Escape Character Messing Up Backlog

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
Dollarluigi
Regular
Posts: 63
Joined: Mon Aug 15, 2016 10:06 pm
Completed: Winter Dream, School For The Friendless
Tumblr: Rehnchoro
Deviantart: Dollarluigi
Skype: Dollarluigi
Soundcloud: Dollarluigi
Location: Probably Earth
Contact:

Escape Character Messing Up Backlog

#1 Post by Dollarluigi » Thu Nov 18, 2021 4:13 am

In one of my projects, I wanted to have a brackets show up and was able to pull that off.

In game, I have the word "[REDACTED]" show up and this is done by just adding an extra bracket to the beginning:

Code: Select all

[[REDACTED]
The visual novel runs fine, but the backlog ends up having an error message after this comes up in the dialogue. Is there any way I can fix this or am I going to have to change "[REDACTED]" to something else entirely?
Suffering a rare condition is one of the worst things you could ever experience because no one understands a thing.

YouTube Twitter Tumblr Reddit deviantArt

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1883
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Escape Character Messing Up Backlog

#2 Post by Ocelot » Thu Nov 18, 2021 4:32 am

Just tested on new project and everything works fine.

What exact error do you have? What did you change related to backlog or text display?
< < insert Rick Cook quote here > >

User avatar
zmook
Veteran
Posts: 421
Joined: Wed Aug 26, 2020 6:44 pm
Contact:

Re: Escape Character Messing Up Backlog

#3 Post by zmook » Thu Nov 18, 2021 10:23 am

Could you post the code for the dialogue and the error message?
colin r
➔ if you're an artist and need a bit of help coding your game, feel free to send me a PM

User avatar
Dollarluigi
Regular
Posts: 63
Joined: Mon Aug 15, 2016 10:06 pm
Completed: Winter Dream, School For The Friendless
Tumblr: Rehnchoro
Deviantart: Dollarluigi
Skype: Dollarluigi
Soundcloud: Dollarluigi
Location: Probably Earth
Contact:

Re: Escape Character Messing Up Backlog

#4 Post by Dollarluigi » Thu Nov 18, 2021 2:39 pm

Code: Select all

    scene bg cafeteria with fade
    stop music fadeout 1.0
    play music restaurant
    h "Vivian, what are you doing?"
    show censoredplate with dissolve
    show vivian dirty with dissolve
    v "Making [[REDACTED]. What's it look like?"
    h "..."
Image
Image

At this part, the backlog works properly.

Image
Image

After Vivian's line, the backlog stops working.
Suffering a rare condition is one of the worst things you could ever experience because no one understands a thing.

YouTube Twitter Tumblr Reddit deviantArt

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1883
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Escape Character Messing Up Backlog

#5 Post by Ocelot » Thu Nov 18, 2021 2:50 pm

What changes did you make to the dialogue box and history screen?

Error message is incomplete. We will need whole message. There is a Copy BBCode button for posting it on forums.

Also, at this moment Vivian's line is not yet added to history screen.
< < insert Rick Cook quote here > >

User avatar
Dollarluigi
Regular
Posts: 63
Joined: Mon Aug 15, 2016 10:06 pm
Completed: Winter Dream, School For The Friendless
Tumblr: Rehnchoro
Deviantart: Dollarluigi
Skype: Dollarluigi
Soundcloud: Dollarluigi
Location: Probably Earth
Contact:

Re: Escape Character Messing Up Backlog

#6 Post by Dollarluigi » Thu Nov 18, 2021 2:55 pm

Ocelot wrote:
Thu Nov 18, 2021 2:50 pm
What changes did you make to the dialogue box and history screen?

Error message is incomplete. We will need whole message. There is a Copy BBCode button for posting it on forums.

Also, at this moment Vivian's line is not yet added to history screen.
This comes up right after Vivian's line:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00gamemenu.rpy", line 173, in script
    $ ui.interact()
  File "renpy/common/00gamemenu.rpy", line 173, in <module>
    $ ui.interact()
  File "game/screens.rpy", line 884, in execute
    screen history():
  File "game/screens.rpy", line 884, in execute
    screen history():
  File "game/screens.rpy", line 891, in execute
    use game_menu(_("History"), scroll=("vpgrid" if gui.history_height else "viewport"), yinitial=1.0):
  File "game/screens.rpy", line 420, in execute
    screen game_menu(title, scroll=None, yinitial=0.0):
  File "game/screens.rpy", line 420, in execute
    screen game_menu(title, scroll=None, yinitial=0.0):
  File "game/screens.rpy", line 429, in execute
    frame:
  File "game/screens.rpy", line 432, in execute
    hbox:
  File "game/screens.rpy", line 438, in execute
    frame:
  File "game/screens.rpy", line 441, in execute
    if scroll == "viewport":
  File "game/screens.rpy", line 456, in execute
    vpgrid:
  File "game/screens.rpy", line 466, in execute
    transclude
  File "game/screens.rpy", line 891, in execute
    use game_menu(_("History"), scroll=("vpgrid" if gui.history_height else "viewport"), yinitial=1.0):
  File "game/screens.rpy", line 895, in execute
    for h in _history_list:
  File "game/screens.rpy", line 897, in execute
    window:
  File "game/screens.rpy", line 900, in execute
    has fixed:
  File "game/screens.rpy", line 914, in execute
    text what
NameError: Name 'REDACTED' is not defined.

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

Full traceback:
  File "renpy/common/00gamemenu.rpy", line 173, in script
    $ ui.interact()
  File "renpy/ast.py", line 928, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "renpy/python.py", line 2245, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "renpy/common/00gamemenu.rpy", line 173, in <module>
    $ ui.interact()
  File "renpy/ui.py", line 298, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "renpy/display/core.py", line 3315, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, **kwargs)
  File "renpy/display/core.py", line 3735, in interact_core
    root_widget.visit_all(lambda i : i.per_interact())
  File "renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/screen.py", line 436, in visit_all
    callback(self)
  File "renpy/display/core.py", line 3735, in <lambda>
    root_widget.visit_all(lambda i : i.per_interact())
  File "renpy/display/screen.py", line 447, in per_interact
    self.update()
  File "renpy/display/screen.py", line 637, in update
    self.screen.function(**self.scope)
  File "game/screens.rpy", line 884, in execute
    screen history():
  File "game/screens.rpy", line 884, in execute
    screen history():
  File "game/screens.rpy", line 891, in execute
    use game_menu(_("History"), scroll=("vpgrid" if gui.history_height else "viewport"), yinitial=1.0):
  File "game/screens.rpy", line 420, in execute
    screen game_menu(title, scroll=None, yinitial=0.0):
  File "game/screens.rpy", line 420, in execute
    screen game_menu(title, scroll=None, yinitial=0.0):
  File "game/screens.rpy", line 429, in execute
    frame:
  File "game/screens.rpy", line 432, in execute
    hbox:
  File "game/screens.rpy", line 438, in execute
    frame:
  File "game/screens.rpy", line 441, in execute
    if scroll == "viewport":
  File "game/screens.rpy", line 456, in execute
    vpgrid:
  File "game/screens.rpy", line 466, in execute
    transclude
  File "game/screens.rpy", line 891, in execute
    use game_menu(_("History"), scroll=("vpgrid" if gui.history_height else "viewport"), yinitial=1.0):
  File "game/screens.rpy", line 895, in execute
    for h in _history_list:
  File "game/screens.rpy", line 897, in execute
    window:
  File "game/screens.rpy", line 900, in execute
    has fixed:
  File "game/screens.rpy", line 914, in execute
    text what
  File "renpy/text/text.py", line 1574, in __init__
    self.set_text(text, scope, substitute)
  File "renpy/text/text.py", line 1693, in set_text
    i, did_sub = renpy.substitutions.substitute(i, scope, substitute)
  File "renpy/substitutions.py", line 270, in substitute
    s = formatter.vformat(s, (), kwargs)
  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/string.py", line 563, in vformat
  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/string.py", line 585, in _vformat
  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/string.py", line 646, in get_field
  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/string.py", line 605, in get_value
  File "renpy/substitutions.py", line 228, in __getitem__
    raise NameError("Name '{}' is not defined.".format(key))
NameError: Name 'REDACTED' is not defined.

Windows-10-10.0.19041
Ren'Py 7.4.10.2178
School For The Friendless 1.1
Thu Nov 18 11:03:16 2021
Suffering a rare condition is one of the worst things you could ever experience because no one understands a thing.

YouTube Twitter Tumblr Reddit deviantArt

User avatar
Dollarluigi
Regular
Posts: 63
Joined: Mon Aug 15, 2016 10:06 pm
Completed: Winter Dream, School For The Friendless
Tumblr: Rehnchoro
Deviantart: Dollarluigi
Skype: Dollarluigi
Soundcloud: Dollarluigi
Location: Probably Earth
Contact:

Re: Escape Character Messing Up Backlog

#7 Post by Dollarluigi » Thu Nov 18, 2021 3:13 pm

Okay, I went back and set "REDACTED" as a variable and I set it to "[REDACTED]" and now it's working.

Code: Select all

default REDACTED = "[REDACTED]"
Suffering a rare condition is one of the worst things you could ever experience because no one understands a thing.

YouTube Twitter Tumblr Reddit deviantArt

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1883
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Escape Character Messing Up Backlog

#8 Post by Ocelot » Thu Nov 18, 2021 3:30 pm

Dollarluigi wrote:
Thu Nov 18, 2021 3:13 pm
Okay, I went back and set "REDACTED" as a variable and I set it to "[REDACTED]" and now it's working.

Code: Select all

default REDACTED = "[REDACTED]"
That is treating symptom, not the cause. There are a lot of potential problems which could arise in the future.

When you modified history screen you have deleted line substitute False from text definition.
Part of code displaying dialogue text should look like:

Code: Select all

                text what:
                    substitute False
< < insert Rick Cook quote here > >

User avatar
Dollarluigi
Regular
Posts: 63
Joined: Mon Aug 15, 2016 10:06 pm
Completed: Winter Dream, School For The Friendless
Tumblr: Rehnchoro
Deviantart: Dollarluigi
Skype: Dollarluigi
Soundcloud: Dollarluigi
Location: Probably Earth
Contact:

Re: Escape Character Messing Up Backlog

#9 Post by Dollarluigi » Mon Nov 22, 2021 9:09 pm

Ocelot wrote:
Thu Nov 18, 2021 3:30 pm
When you modified history screen you have deleted line substitute False from text definition.
Part of code displaying dialogue text should look like:

Code: Select all

                text what:
                    substitute False
I'm not quite sure I understand what you're getting at. I don't remember deleting anything.

Here's what I found in the code:

Code: Select all

                $ what = renpy.filter_text_tags(h.what, allow=gui.history_allow_tags)
                text what:
                    substitute False

        if not _history_list:
            label _("The dialogue history is empty.")
Suffering a rare condition is one of the worst things you could ever experience because no one understands a thing.

YouTube Twitter Tumblr Reddit deviantArt

Post Reply

Who is online

Users browsing this forum: Bing [Bot]