Renpy sdk 8.2.0
Some problem with text interpolation in renpy.say...
" %% problem" # Ok -> % problem
e "\% problem" # Ok -> % problem
label test (mess):
"[mess]"
return
$renpy.call ("test", "%% problem") # ?? -> "%% problem"
# but...
$renpy.say(None, "%% problem") # ko - > "%% problem"
# and
$renpy.say (None, "\% Problem") # ko exception 'related to the P of problem not recognized
$renpy.say (None, "\%") # ko exception (incomplete format)
As said in title, am I really missing something or is this a bug?
Thks
[special char interpolation]What am I missing?
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3797
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: [special char interpolation]What am I missing?
If I understand you correctly...
try it this way
You could also achieve it this way
try it this way
Code: Select all
label start:
"some test."
jump somelabel
label test (mess):
"[mess]."
return
label somelabel:
$renpy.call ("test", str("% problem"))
"test successful."
return
Code: Select all
default testvar = ""
##################
label start:
"some test."
jump somelabel
label test (mess):
"[mess]."
return
label somelabel:
$testvar = "% problem"
$renpy.call ("test", testvar)
"test successful."
return
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Re: [special char interpolation]What am I missing?
Thanks for your answer...but for me it doesn't solve my problem
It wasn't a good idea to add (for completude?) the renpy.call case...
Real question was why do say and renpy.say have a different behavior regarding special character?
My problem is : I'm reading text in a file to display it on the screen. I want to do some interpolations in this text (could contain [var] and {tag} things)...
But I'm currently unable to display properly a % char (and some others) found in the input (best I can achieve is %% )
It wasn't a good idea to add (for completude?) the renpy.call case...
Real question was why do say and renpy.say have a different behavior regarding special character?
My problem is : I'm reading text in a file to display it on the screen. I want to do some interpolations in this text (could contain [var] and {tag} things)...
But I'm currently unable to display properly a % char (and some others) found in the input (best I can achieve is %% )
Re: [special char interpolation]What am I missing?
So nobody has an idea / workaround for this 'simple' problem :
why renpy.say doesn't work with some escape sequences when normal say works...
Should be easy !
why renpy.say doesn't work with some escape sequences when normal say works...
Should be easy !
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3797
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: [special char interpolation]What am I missing?
You could try the discord.
I've never used renpy.say so I have no experience with it
I've never used renpy.say so I have no experience with it
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Who is online
Users browsing this forum: No registered users