Annoying script error

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
Reficul Hopes
Newbie
Posts: 2
Joined: Sat May 04, 2024 9:31 am
Contact:

Annoying script error

#1 Post by Reficul Hopes »

Hello there. I am working on a Ace Attorney-like game. I needed something similar to court records from that game, somewhat inventory. I have found VN which represents just that - inventory that looks just like the one from AA and works the same way. But the creator added one feature I don't need. So basically there are three buttons at the right top corner: "Profiles", "Evidences" and "Assistant". I don't need the first and the third ones. But most of all - the third. So I found it in the code, deleted the line and... script error ! And not just that. I am not even sure that this error somehow connected to what I've done. Then I found out that the same error occurs no matter what you edit in the script. So... Help, please ?.. I am leaving here a link to that visual novel so you can look through scripts yourself and see how it works even. And also a screenshot of the script error. The error first occured when I deleted one of the last three lines in court_records.rpy

https://github.com/overlordofflies/court_record
Attachments
Скриншот 01-05-2024 231456.png
(102.79 KiB) Not downloaded yet

User avatar
m_from_space
Eileen-Class Veteran
Posts: 1009
Joined: Sun Feb 21, 2021 3:36 am
Contact:

Re: Annoying script error

#2 Post by m_from_space »

The reason it does work when not changing anything is, that it uses the precompiled .rpyc files when executing. As soon as you edit anything, it will try to recompiling the game and result in the error. The error is due to the code not being proper anymore, since it is 6 years old.

But I found the issue:

Change the following code inside <court_record.rpy> on line 118:

Code: Select all

    frame:
        $ pages = records.getPage()
        xsize 1280
        ysize 720
        background Frame("evidence_window.png") 

# change to this

    frame:
        xsize 1280
        ysize 720
        background Frame("evidence_window.png") 
        $ pages = records.getPage()

Reficul Hopes
Newbie
Posts: 2
Joined: Sat May 04, 2024 9:31 am
Contact:

Re: m_from_space

#3 Post by Reficul Hopes »

Thanks a lot ! Now it does works, finally !

User avatar
Milkymalk
Miko-Class Veteran
Posts: 762
Joined: Wed Nov 23, 2011 5:30 pm
Completed: Don't Look (AGS game)
Projects: KANPEKI! ★Perfect Play★
Organization: Crappy White Wings
Location: Germany
Contact:

Re: Annoying script error

#4 Post by Milkymalk »

m_from_space wrote: Sun May 05, 2024 6:11 am

Code: Select all

    frame:
        $ pages = records.getPage()
        xsize 1280
        ysize 720
        background Frame("evidence_window.png") 

# change to this

    frame:
        xsize 1280
        ysize 720
        background Frame("evidence_window.png") 
        $ pages = records.getPage()
Why is the order relevant here? I don't get it.
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)

jeffster
Veteran
Posts: 436
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

Re: Annoying script error

#5 Post by jeffster »

Milkymalk wrote: Thu May 09, 2024 7:31 pm Why is the order relevant here? I don't get it.
Read the error message in the original screenshot. Apparently Ren'Py can't always translate its instructions after pieces of arbitrary Python code.
If the problem is solved, please edit the original post and add [SOLVED] to the title. 8)

MakhiPollard
Newbie
Posts: 1
Joined: Fri May 03, 2024 5:55 am
Contact:

Re: Annoying script error

#6 Post by MakhiPollard »

It is working for me also.

Post Reply

Who is online

Users browsing this forum: No registered users