Missing error on defining two screens with the same name

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
apricotorange
Veteran
Posts: 479
Joined: Tue Jun 05, 2012 2:01 am
Contact:

Missing error on defining two screens with the same name

#1 Post by apricotorange »

Pointed out in http://lemmasoft.renai.us/forums/viewto ... =8&t=16536 ; the following does not lead to an error:

Code: Select all

screen foo:
    textbutton "asdf"

screen foo:
    textbutton "asdf"
This is really confusing.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
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: Missing error on defining two screens with the same name

#2 Post by PyTom »

At least for now, this is intentional - it allows you to override a screen that was defined earlier.

(I may at some point tighten the requirement such that it's an error if the screen is defined twice at the same init level.)
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: No registered users