Conceal something written on string

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
EternalVoid
Newbie
Posts: 13
Joined: Thu Oct 15, 2020 9:59 am
Soundcloud: DivinePlane
Contact:

Conceal something written on string

#1 Post by EternalVoid »

So I was reading a tutorial on how to do this but the "mask" thing doesn't work as expected.

Followed the tutorial from here: https://www.renpy.org/doc/html/input.html

And tried implementing it in this code:

Code: Select all

$ name = renpy.input("Username", allow="abcdefghijklmnopqrstuvwxyz0123456789_.", length=20)
$ name = name.strip()
When I put mask=None it shows this error:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 18, in script
    $ name = renpy.input("Username", allow="abcdefghijklmnopqrstuvwxyz0123456789_.", length=20, mask=None)
  File "game/script.rpy", line 18, in <module>
    $ name = renpy.input("Username", allow="abcdefghijklmnopqrstuvwxyz0123456789_.", length=20, mask=None)
TypeError: input() got an unexpected keyword argument 'mask'

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

Full traceback:
  File "game/script.rpy", line 18, in script
    $ name = renpy.input("Username", allow="abcdefghijklmnopqrstuvwxyz0123456789_.", length=20, mask=None)
  File "renpy/ast.py", line 922, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "renpy/python.py", line 2218, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/script.rpy", line 18, in <module>
    $ name = renpy.input("Username", allow="abcdefghijklmnopqrstuvwxyz0123456789_.", length=20, mask=None)
TypeError: input() got an unexpected keyword argument 'mask'

Windows-10-10.0.19041
Ren'Py 7.4.2.1292
Best Date Ever 1.0
Sun Sep 26 23:45:25 2021
I can't find any information around, if someone can help it would be fantastic!

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3784
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Conceal something written on string

#2 Post by Imperf3kt »

I don't think mask is supposed to be added unless you're using it.
Try mask="*"
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Conceal something written on string

#3 Post by PyTom »

Mask was added in 7.4.5, also, so it won't work in 7.4.2.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]