Documenting my experience from upgrading from 7.4.10 to 8.0.2

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
henvu50
Veteran
Posts: 337
Joined: Wed Aug 22, 2018 1:22 am
Contact:

Documenting my experience from upgrading from 7.4.10 to 8.0.2

#1 Post by henvu50 »

I'm going to document my experience from upgrading 7.4.10 to 8.0.2. Hopefully others will find this information useful. I do semi complex programming in Python 2, in my Ren'py game. I test it to ensure it works on Android and Tablet.

1. I did the update to 8.0.2, now Ren'py will restart. So far so good.

2. During restart, I got a traceback error:
The pain begins....... I must endure.

Code: Select all

I'm sorry, but an uncaught exception occurred.
While running game code:
  File "game/editor.rpy", line 317, in <module>
  File "game/editor.rpy", line 272, in fancy_activate_editor
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Apps\\renpy-7.4.8-sdk\\atom\\Atom.edit.py'
3. So the auto restart after update failed with the above exception error. Hopefully that won't cause catastrophic problems long term.
4. I manually started Ren'py Launcher and it's asking me for default language. I pick english.
5. I'm at version 8.0.2.22081402.
6. I use Atom as my Text Editor, version 1.57. Checking to see if this is the latest updated version I should be using.....*BUSY*..... Looks like Atom is reaching its end of life, and people are recommending that I use Visual Studio Code, which is what Ren'py recommends now. I now use Visual Studio Code. You can verify it's optimized for REn'py by looking on the bottom right, you'll see Ren'py set as the preferred language. Visual studio code doesn't show the file explorer on the left by default, you have to click "open folder" and add your project game folder as a trusted folder. Visual Studio Code reports inconsistent spacing if you use carriage return to organize your code, kind of annoying. I'll try to find a fix. Ren'py is set as preferred language, not sure why this error is showing up.

Image

So if I wrote code like this, it will show errors:

Code: Select all

if not persistent.somevar:
    use someFunction(i_x=2,
                     i_ys=742)
EDIT: Make sure the spaces are increments of four, and it will get rid of the error. So delete one space at a time until error goes away. If you set the amount of spaces to increment of four and it doesn't work, it means the problem still exists in lines that come before, so scroll up and make sure you fix this problem from TOP DOWN. If this error exists on line 10, and you try to fix it on line 848, it won't work, you have to fix line 10 first.

7. Oh god, now I'm going to run my game for the first time. *ANXIETY BUILDING* Oh god.... Here we go.

Code: Select all

SyntaxError: non-default argument follows default argument
Here is a link explaining the error: https://researchdatapod.com/python-synt ... 0arguments.

I only had to edit and fix one function.

8. OMG. MY GAME RUNS. I was expecting a slew of errors. IT RUNS. I was expecting to get set back by at least a week, but omg it runs. Thank god.

9. Looks like some variables show very long float values. Have to figure out how to just show decimal.
So if you want to show a non-float variable value to the user, do this from now on:

Code: Select all

screen test():
    # shows value rounded to two decimal places
    text [persistent.somevariable:.2] ## https://www.renpy.org/doc/html/text.html#interpolating-data
    # OR this way
    text "{:02d}".format(persistent.somevariable)
Thanks to Pinky for pointing this out: https://www.renpy.org/doc/html/text.htm ... ating-data

So you gotta always format the variable, or you might end up showing a long float variable to the end user. This is a Python 3 thing.

10. Looks like that was pretty smooth. My game is working fine and it's pretty darn complicated with what I do. I do a lot of out of the box stuff, but everything working good so far.

Well done to Renpytom! That man is pro!

Post Reply

Who is online

Users browsing this forum: No registered users