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.
-
Exiscoming
- Regular
- Posts: 127
- Joined: Tue Apr 29, 2014 5:37 pm
-
Contact:
#1
Post
by Exiscoming » Thu Nov 05, 2020 5:59 am
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.
-
Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
-
Contact:
#2
Post
by Imperf3kt » Thu Nov 05, 2020 8:47 am
I think the issue might be the final line
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
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
-
rayminator
- Miko-Class Veteran
- Posts: 754
- Joined: Fri Feb 09, 2018 12:05 am
- Location: Canada
-
Contact:
#3
Post
by rayminator » Thu Nov 05, 2020 2:13 pm
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
-
PyTom
- Ren'Py Creator
- Posts: 15893
- 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:
#4
Post
by PyTom » Fri Nov 06, 2020 11:08 am
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
"Silly and fun things are important." - Elon Musk
Software > Drama •
https://www.patreon.com/renpytom
-
PyTom
- Ren'Py Creator
- Posts: 15893
- 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:
#5
Post
by PyTom » Mon Nov 09, 2020 1:41 am
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
"Silly and fun things are important." - Elon Musk
Software > Drama •
https://www.patreon.com/renpytom
-
Exiscoming
- Regular
- Posts: 127
- Joined: Tue Apr 29, 2014 5:37 pm
-
Contact:
#6
Post
by Exiscoming » Wed Jan 27, 2021 2:17 pm
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.
Users browsing this forum: Bing [Bot]