I don't understand this error
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.
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.
I don't understand this error
I was writing some dialogue and I wrote the phrase "¡Eso espero! ¡Gracias!" ("I hope so! Thank you!" in Spanish). When I launched the game, this appeared:
File "game/script.rpy", line 33, in script
S "¡Eso espero! ¡Gracias"
ValueError: invalid literal for int() with base 16: 'gr'
What does it mean? I don't know how to fix it
File "game/script.rpy", line 33, in script
S "¡Eso espero! ¡Gracias"
ValueError: invalid literal for int() with base 16: 'gr'
What does it mean? I don't know how to fix it
- namastaii
- Eileen-Class Veteran
- Posts: 1350
- Joined: Mon Feb 02, 2015 8:35 pm
- Projects: Template Maker for Ren'Py, What Life
- Github: lunalucid
- Skype: Discord: lunalucid#1991
- Soundcloud: LunaLucidMusic
- itch: lunalucid
- Location: USA
- Contact:
Re: I don't understand this error
I believe there is something else in your script creating this error. Could you show me the code before and after that line? Sometimes, the error will show a line of code close to the actual error
- Donmai
- Eileen-Class Veteran
- Posts: 1960
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
- Contact:
Re: I don't understand this error
Check any hexadecimal strings in your scripts (like color RGB values) for typing errors.
That's usually what the "invalid literal for int() with base 16" error points to.
Usually, you will get an "invalid literal for int() with base 16:'#'" message.
'gr' is a novelty to me.
That's usually what the "invalid literal for int() with base 16" error points to.
Usually, you will get an "invalid literal for int() with base 16:'#'" message.
'gr' is a novelty to me.
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
Re: I don't understand this error
Before what I wrote, it says:
While processing the color property of anonymous style:
And after what I wrote it shows the full traceback
Re: I don't understand this error
When asking for the code before and after, it was not meant from the error screen, it was meant from your script. Sometimes the line number reported as causing the error isn’t really the line that caused the error - it could be something just before or after. So, if you can give us a bit more of your script, it might help.
- Donmai
- Eileen-Class Veteran
- Posts: 1960
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
- Contact:
Re: I don't understand this error
I think I've already told you what's the problem.While processing the color property of anonymous style:
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
- isobellesophia
- Miko-Class Veteran
- Posts: 979
- Joined: Mon Jan 07, 2019 2:55 am
- Completed: None
- Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
- Organization: Friendly Teachers series
- Deviantart: SophBelle
- itch: Child Creation
- Location: Philippines, Mindanao
- Contact:
Re: I don't understand this error
Show us the code a bit and the traceback about it, its kinda more confusing to understand the error you've been encountering.
Re: I don't understand this error
Well, that line is the last line of a choice. I mean, three lines before that I used the "menu" code (for making choices), and it's the first time I use it, so maybe that's part of the problem. And after that, I started another label for the menu.rames44 wrote: ↑Sat Sep 14, 2019 2:05 pm When asking for the code before and after, it was not meant from the error screen, it was meant from your script. Sometimes the line number reported as causing the error isn’t really the line that caused the error - it could be something just before or after. So, if you can give us a bit more of your script, it might help.
- namastaii
- Eileen-Class Veteran
- Posts: 1350
- Joined: Mon Feb 02, 2015 8:35 pm
- Projects: Template Maker for Ren'Py, What Life
- Github: lunalucid
- Skype: Discord: lunalucid#1991
- Soundcloud: LunaLucidMusic
- itch: lunalucid
- Location: USA
- Contact:
Re: I don't understand this error
You need to actually copy and paste your code because we can't see what's going on. If you tell us what you did, that doesn't really help because it could be a syntax error, etc. It'll be something you aren't catching that we can but we can't do anything without seeing the exact code. When asking for help, you'd normally copy and paste your code in a post between the code brackets
Code: Select all
Your code will be displayed like this so we can review how the error occurred.
- isobellesophia
- Miko-Class Veteran
- Posts: 979
- Joined: Mon Jan 07, 2019 2:55 am
- Completed: None
- Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
- Organization: Friendly Teachers series
- Deviantart: SophBelle
- itch: Child Creation
- Location: Philippines, Mindanao
- Contact:
Re: I don't understand this error
I think it is related to the color hex error, maybe you tried putting this..
instead of this
which is likely got this error for somebody.
Code: Select all
#FF0
Code: Select all
#FF0000
- namastaii
- Eileen-Class Veteran
- Posts: 1350
- Joined: Mon Feb 02, 2015 8:35 pm
- Projects: Template Maker for Ren'Py, What Life
- Github: lunalucid
- Skype: Discord: lunalucid#1991
- Soundcloud: LunaLucidMusic
- itch: lunalucid
- Location: USA
- Contact:
Re: I don't understand this error
There's nothing wrong with #FF0 though
It's more likely they typed ## instead of one #
It's more likely they typed ## instead of one #
- Donmai
- Eileen-Class Veteran
- Posts: 1960
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
- Contact:
Re: I don't understand this error
As I said (maybe not very clearly, I admit) before. The error "invalid literal for int() with base 16" in Ren'Py generally points to a color value wrongly typed. Ren'Py recognizes RGB hex values ("#fff" or "#ffffff") or RGBA (A for Alpha or transparency value) hex values ("#ffffff7f").
If you type, say "#fffff" that will give you an "invalid literal for int() with base 16" error message.
If you type, say "#fffff" that will give you an "invalid literal for int() with base 16" error message.
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
Who is online
Users browsing this forum: No registered users