Ren'Py Ren'py coding/script issues.

JD-NaughtyAtticGaming

Newbie
Game Developer
Sep 16, 2024
18
214
Hello,

I'm the developer of the game Sweet Affection and I've been having this issue with the script today.
An issue that I've never ran into before.

Whenever I'm trying to make a build with Ren'py, this error pops up after a while.

You don't have permission to view the spoiler content. Log in or register now.

You don't have permission to view the spoiler content. Log in or register now.

Yes, I know that I'm using an ancient version of Ren'py.
This is because this ren'py was heavily modified to deal with the vast amount of images and size of the game. (30+ GB)
I never ran into any issues in the past couple of years.

The image in question is fine and the game itself starts normally as well in the ren'py menu and the event plays out normally
I tried removing that image in question from the script but the error simply moves towards the next image in the script and gives the same error.

I'm really lost right now and not sure what I'm supposed to do.
And I'm hoping that perhaps one of you guys/girls know something about this.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
12,246
19,523
I tried removing that image in question from the script but the error simply moves towards the next image in the script and gives the same error.
Because the error obviously don't come from there. image is a statement processed at init level ( ), this while you say that the error while the game is running.
For some reasons it's the point where the infinite loop guard is triggered, but not what cause it. You've to look above in the script for what can possibly cause the issue. With "above" being possibly anywhere in the whole code. You should focus on where in the game (and there in which label) the error happen, not on the line that Ren'Py point.

Be also noted that "infinite loop" isn't necessarily an actual loop. Ren'Py just check the time between two statements/interactions, and will trigger the "infinite loop" exception if it takes more time that its threshold. So, if you've a bit of python code (but not necessarily just this) that take way too long, you can end with an "infinite loop" that happen outside of a loop.



By the way, you don't need all those image declarations. Ren'Py know perfectly well how to .
What mean that all your image Z_11PM_S_Lv11_Together_30 = "Home/SBedroom/Level11/Z-11PM-S-Lv11-Together (30).jpg" are totally unnecessary. Using directly scene z-11pm-s-lv11-together (30) in your code will show the right image even without the declaration line.
The same apply for:
Python:
image Z_11PM_S_Lv11_Together_24:
    "Home/SBedroom/Level11/Z-11PM-S-Lv11-Together (24).jpg" with dissolve
    pause 2
    "Home/SBedroom/Level11/Z-11PM-S-Lv11-Together (25).jpg" with dissolve
    pause 2
    repeat
that could be this instead:
Python:
label whatever:
    [...]
    scene theNameDoesntCount:
        "z-11pm-s-lv11-together (24)" with dissolve
        pause 2
        "z-11pm-s-lv11-together (25)" with dissolve
        pause 2
        repeat
Even the "[ImgFileType]" at the end of the declaration is totally useless; and therefore do not justify the said declaration line.
Ren'Py don't care about the file extension. As long as it's one of the four supported for the three supported image formats (".jpg", ".jpeg", ".png", ".webp"), it will deal correctly with the image. This even if the extension doesn't correspond to the format (".png" for a WEBP image by example).