Renpy 7.4 Exception: Properties are not allowed here. [Solved]

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
Exiscoming
Regular
Posts: 132
Joined: Tue Apr 29, 2014 5:37 pm
Contact:

Renpy 7.4 Exception: Properties are not allowed here. [Solved]

#1 Post by Exiscoming »

Just downloaded v7.4 and when trying to launch my game I get:

Code: Select all

After initialization, but before game start.
  File "game/items.rpy", line 2856, in prepare_screen
    screen items:
Exception: Properties are not allowed here.
When I look in the code, it's just a normal screen with imagebuttons. Here's a snippet:

Code: Select all

screen items:
    add "gui/itemUI/items/itemsUI.png"
    
    # EXIT
    vbox xalign 0.01 yalign 0.012:
        imagebutton:
            idle "gui/itemUI/shop1/exit1.png"
            hover "gui/itemUI/shop1/exit1-hover.png"
            action Jump("worldmap")
            
    # Magazines
    if magazine >= 1:
        vbox xalign 0.070 yalign 0.52:
            imagebutton:
                idle "gui/itemUI/items/magazine.png"
                hover "gui/itemUI/items/magazine-hover.png"
                action Jump("inspMagazine")
        vbox xalign 0.165 yalign 0.60:
            if magazine >= 1:
                text "{color=#8d8d8d}[magazine]{/color}"
Is there something new in Renpy v7.4 that changes how imagebuttons work?
Last edited by Exiscoming on Wed Jan 27, 2021 2:12 pm, edited 1 time in total.

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

Re: Renpy 7.4 Exception: Properties are not allowed here.

#2 Post by Imperf3kt »

I think the issue might be the final line

Code: Select all

{color=#8d8d8d}[magazine]{/color} 
You're using a text tag color property to style what should be styled using an actual style.
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

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: Renpy 7.4 Exception: Properties are not allowed here.

#3 Post by rayminator »

you would have to change the image file names

instead of using exit1-hover use exit1_hover
instead of using magazine-hover use magazine_hover

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: Renpy 7.4 Exception: Properties are not allowed here.

#4 Post by PyTom »

I'm tentatively tracking this as a bug in 7.4. I'm not seeing anything obviously wrong with this.

https://github.com/renpy/renpy/issues/2450
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

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: Renpy 7.4 Exception: Properties are not allowed here.

#5 Post by PyTom »

I've been unable to repeat this, after copying the screen in question into a fresh project.
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

Exiscoming
Regular
Posts: 132
Joined: Tue Apr 29, 2014 5:37 pm
Contact:

Re: Renpy 7.4 Exception: Properties are not allowed here. [Solved]

#6 Post by Exiscoming »

Sorry to necro this thread, but I found out what's causing the error message.
It was actually part of a different bit of code that I didn't link.
The error was here:

Code: Select all

    if itemsSelectButton == 3:
	modal True						# <- Conflict
        default x = renpy.get_mouse_pos()[0]
        default y = renpy.get_mouse_pos()[1]
        frame:
            pos (x + 20, y + 15)
            has vbox
            textbutton "View":                                        # View loot
                clicked SetVariable("itemsSelectButton", 0), Jump("sellLoot")
            textbutton "Inspect":                                    # Inspect loot
                clicked SetVariable("itemsSelectButton", 0), Jump("inspLoot")
            textbutton "Back":
                action SetVariable("itemsSelectButton", 0), Jump("items")
I copied some old code which had the modal True bit in there. Too be honest, I don't even really know what it's used for, but after deleting the code bit by bit and restoring it, I found out that this was causing the error. I haven't had anymore error messages since the fix.

Post Reply

Who is online

Users browsing this forum: No registered users