having issues with minigame built in pygame

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
toreachpoise
Newbie
Posts: 1
Joined: Mon Aug 15, 2022 9:59 pm
Github: toreachpoise
itch: toreachpoise
Contact:

having issues with minigame built in pygame

#1 Post by toreachpoise » Mon Aug 15, 2022 10:37 pm

Hello!

I've been trying to import a minigame I built with pygame into my ren'py game. The minigame works fine in python. However when I copy it into a .rpy file in my game inside an

Code: Select all

init python:
block, it keeps crashing ren'py on startup. I'm not even trying to call it yet (though I'm not sure how to do that if I succeed in importing it).

Here's the error code I got:

Code: Select all

While processing the hover_color property of style _hyperlink:
  File "renpy/common/00start.rpy", line 83, in _init_language
    renpy.change_language(language)
Exception: Not a color: (34, 68, 204, 255)
I haven't touched 00start.rpy, and it's not corrupted because The Question runs fine.

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

Re: having issues with minigame built in pygame

#2 Post by Imperf3kt » Tue Aug 16, 2022 4:24 am

This is usually caused by having duplicate start labels.
Search the rpy file for any extra labels - you should only have one of any label.
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

Post Reply

Who is online

Users browsing this forum: No registered users