Simple Mailbox Using persistent data [HELP]
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.
- beastcarving
- Regular
- Posts: 139
- Joined: Mon May 13, 2019 5:03 pm
- Completed: Pulse Cage https://beastcarving.itch.io/pulse-cage-the-full-series
- Projects: Your Brother's Religion
- Organization: BeastCarving Studio
- IRC Nick: BeastCarving
- Tumblr: beastcarving
- Deviantart: beastcarving
- Github: beastcarving
- itch: beastcarving
- Contact:
Simple Mailbox Using persistent data [HELP]
I've seen other's using a similar mail box function but none of those save the letters in your indox after exiting the game. I've tried using it myself by adjusting the code a bit, even after reloading and exiting the game, the mail box is empty again. How do I make the messages save using persistent data?
Pulse Cage (full game)
Your Brother's Religion (Demo)PLAY HERE: https://beastcarving.itch.io/
Love my work: https://www.patreon.com/beastcarving
- Per K Grok
- Miko-Class Veteran
- Posts: 882
- Joined: Fri May 18, 2018 1:02 am
- Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
- itch: per-k-grok
- Location: Sverige
- Contact:
Re: Simple Mailbox Using persistent data [HELP]
beastcarving wrote: ↑Fri Feb 14, 2020 3:05 amI've seen other's using a similar mail box function but none of those save the letters in your indox after exiting the game. I've tried using it myself by adjusting the code a bit, even after reloading and exiting the game, the mail box is empty again. How do I make the messages save using persistent data?
This will give you an opportunity to save persistent data.
When you exit and restart the program the data you have saved will be shown. If no data is saved you will get the message "postbox empty".
Code: Select all
label start:
if not persistent.postbox:
"postbox empty"
else:
$ pb=persistent.postbox
"[pb]"
$ pb= renpy.input("Enter text to postbox")
$ persistent.postbox = pb
$ renpy.save_persistent()
pause
return
Who is online
Users browsing this forum: No registered users