I think I broke the Save function... [SOLVED]
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.
- pyopyon
- Veteran
- Posts: 451
- Joined: Thu Aug 29, 2013 4:35 am
- Completed: https://chouette.itch.io/
- Projects: Ocean Pearls, Catching the Fox [NaNo16], Singles
- Organization: Jellyfish Parade
- Tumblr: jelpiparade
- Skype: miss.chouette
- Soundcloud: pyopyon
- itch: chouette
- Contact:
I think I broke the Save function... [SOLVED]
EDIT: removed for spoiler purposes
Thank you, everyone for your help! :^)
Thank you, everyone for your help! :^)
Last edited by pyopyon on Sat Apr 05, 2014 7:38 pm, edited 2 times in total.
-
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Re: I think I broke the Save function...
If you disable the dress-up menu (and leave the other two menus in) does save still get broken? This will help narrow things down because the other menu that breaks things (the computer one) is much less code and it's in screen language at least.
- pyopyon
- Veteran
- Posts: 451
- Joined: Thu Aug 29, 2013 4:35 am
- Completed: https://chouette.itch.io/
- Projects: Ocean Pearls, Catching the Fox [NaNo16], Singles
- Organization: Jellyfish Parade
- Tumblr: jelpiparade
- Skype: miss.chouette
- Soundcloud: pyopyon
- itch: chouette
- Contact:
Re: I think I broke the Save function...
If I disable the dress up menu, the save function totally normal.
Re: I think I broke the Save function...
that mean it most likely something the dress up menu is doing to cause the save to muck up
-
- Veteran
- Posts: 448
- Joined: Wed Nov 18, 2009 11:17 am
- Completed: Loren
- Projects: PS2
- Location: Germany
- Contact:
Re: I think I broke the Save function...
You never reach the return in the called label, every time you jump out of it. That's why the control flow never returns to the main context.
Avatar created with this deviation by Crysa
Currently working on:
Currently working on:
- Winterwolves "Planet Stronghold 2" - RPG Framework: Phase III
- pyopyon
- Veteran
- Posts: 451
- Joined: Thu Aug 29, 2013 4:35 am
- Completed: https://chouette.itch.io/
- Projects: Ocean Pearls, Catching the Fox [NaNo16], Singles
- Organization: Jellyfish Parade
- Tumblr: jelpiparade
- Skype: miss.chouette
- Soundcloud: pyopyon
- itch: chouette
- Contact:
Re: I think I broke the Save function...
I know XD I know that the problem is in both of these menus, I simply don't know where the problem lies, exactly.rakada wrote:that mean it most likely something the dress up menu is doing to cause the save to muck up
I deleted the 'return'!Anima wrote:You never reach the return in the called label, every time you jump out of it. That's why the control flow never returns to the main context.
...No change, though. )^:
I save, the picture that shows is of the place I saved, but when I click it.... automatically returns to the dress up game.
Last edited by pyopyon on Thu Mar 13, 2014 10:10 am, edited 1 time in total.
-
- Veteran
- Posts: 448
- Joined: Wed Nov 18, 2009 11:17 am
- Completed: Loren
- Projects: PS2
- Location: Germany
- Contact:
Re: I think I broke the Save function...
The return was correct, the jumps are the problem. You should never mix jumping and calling.
Avatar created with this deviation by Crysa
Currently working on:
Currently working on:
- Winterwolves "Planet Stronghold 2" - RPG Framework: Phase III
- pyopyon
- Veteran
- Posts: 451
- Joined: Thu Aug 29, 2013 4:35 am
- Completed: https://chouette.itch.io/
- Projects: Ocean Pearls, Catching the Fox [NaNo16], Singles
- Organization: Jellyfish Parade
- Tumblr: jelpiparade
- Skype: miss.chouette
- Soundcloud: pyopyon
- itch: chouette
- Contact:
Re: I think I broke the Save function...
Ah, I see. Well... is there a way to fix it without taking out any of the dress-up code?Anima wrote:The return was correct, the jumps are the problem. You should never mix jumping and calling.
-
- Veteran
- Posts: 448
- Joined: Wed Nov 18, 2009 11:17 am
- Completed: Loren
- Projects: PS2
- Location: Germany
- Contact:
Re: I think I broke the Save function...
While I would recommend a complete rewrite, the whole things one big mess, it should be enough to replace the jump to dressednow with a return statement.
But you should seriously consider tidying up your script. Screen declarations shouldn't be in the middle of the script, loops should actually be done with a while instead of simply jumping somewhere back. Use screen language instead of ui functions and separate logic from GUI code whenever possible.
But you should seriously consider tidying up your script. Screen declarations shouldn't be in the middle of the script, loops should actually be done with a while instead of simply jumping somewhere back. Use screen language instead of ui functions and separate logic from GUI code whenever possible.
Avatar created with this deviation by Crysa
Currently working on:
Currently working on:
- Winterwolves "Planet Stronghold 2" - RPG Framework: Phase III
- pyopyon
- Veteran
- Posts: 451
- Joined: Thu Aug 29, 2013 4:35 am
- Completed: https://chouette.itch.io/
- Projects: Ocean Pearls, Catching the Fox [NaNo16], Singles
- Organization: Jellyfish Parade
- Tumblr: jelpiparade
- Skype: miss.chouette
- Soundcloud: pyopyon
- itch: chouette
- Contact:
Re: I think I broke the Save function...
Unfortunately, as this isn't my own work (I got it from the cookbook), I don't know how to rewrite it...
But I can fix minor things if you specify. I think I understand what you're saying, so I'll attempt to fix it.
But I can fix minor things if you specify. I think I understand what you're saying, so I'll attempt to fix it.
- pyopyon
- Veteran
- Posts: 451
- Joined: Thu Aug 29, 2013 4:35 am
- Completed: https://chouette.itch.io/
- Projects: Ocean Pearls, Catching the Fox [NaNo16], Singles
- Organization: Jellyfish Parade
- Tumblr: jelpiparade
- Skype: miss.chouette
- Soundcloud: pyopyon
- itch: chouette
- Contact:
Re: I think I broke the Save function...
I think the use of a jump is unavoidable, or else you can't ge back to the game...
This is what I did:
And also, it doesn't fix it;;
This is what I did:
Code: Select all
if picked == "goback":
menu:
"I like the way I look.":
nimpov "Perfect."
scene bedroom with fade
"Almost as soon as you complete this small task, you hear a loud knock on the door."
jump defdressednow
"I want to change something.":
"Mhm... you look good, but there's something off about your uniform choices."
return
- pyopyon
- Veteran
- Posts: 451
- Joined: Thu Aug 29, 2013 4:35 am
- Completed: https://chouette.itch.io/
- Projects: Ocean Pearls, Catching the Fox [NaNo16], Singles
- Organization: Jellyfish Parade
- Tumblr: jelpiparade
- Skype: miss.chouette
- Soundcloud: pyopyon
- itch: chouette
- Contact:
Re: I think I broke the Save function...
I think you can relatively easily simplify/shorten this code by a lot by using normal screen functions, that would probably also make it easier to figure out
for example, this code, when put inside a screen statement (you would need to adjust it properly though, i'm writing it from the top of my head; I think you will need an arrowL_hover.png and an arrowL_idle.png etc.):
should be able to do the same as this whole code
I'll link you to this lovely guide about imagebuttons made by leon
http://lemmasoft.renai.us/forums/viewto ... 51&t=22565
for example, this code, when put inside a screen statement (you would need to adjust it properly though, i'm writing it from the top of my head; I think you will need an arrowL_hover.png and an arrowL_idle.png etc.):
Code: Select all
imagebutton auto "arrowL%s.png" action SetVariable('skin',max(skin-1,0))
imagebutton auto "arrowR%s.png" action SetVariable('skin',min(skin+1,skin_styles_num))
Code: Select all
ui.imagebutton("arrowL.png", "arrowL.png", clicked=ui.returns("skinL"), ypos=y, xpos=70)
ui.imagebutton("arrowR.png", "arrowR.png", clicked=ui.returns("skinR"), ypos=y, xpos=430)
$ picked = ui.interact()
# based on the selection, we increase or decrease the index of the appropriate dress up item
if picked == "skinL":
$ skin -= 1 # previous skin
if picked == "skinR":
$ skin += 1 # next skin
if skin < 1: # making sure we don't get out of index range (index 0 is not allowed)
$ skin = skin_styles_num
if skin > skin_styles_num: # making sure we don't get out of index range (index musn't be bigger than hair_styles_num)
$ skin = 1
http://lemmasoft.renai.us/forums/viewto ... 51&t=22565
- pyopyon
- Veteran
- Posts: 451
- Joined: Thu Aug 29, 2013 4:35 am
- Completed: https://chouette.itch.io/
- Projects: Ocean Pearls, Catching the Fox [NaNo16], Singles
- Organization: Jellyfish Parade
- Tumblr: jelpiparade
- Skype: miss.chouette
- Soundcloud: pyopyon
- itch: chouette
- Contact:
Re: I think I broke the Save function...
Well... I'll try my best to recode it;;;
That said, can I have some help with the second menu, the computer screen menu?
The image map of the Map (screen #2) is between the two screens and it works perfectly fine, so I would assume that the issues are separate.
I'm going to try to do the dress-up game over but I'm really not an experienced programmer so... yes. In any case, any theories with the second menu?
That said, can I have some help with the second menu, the computer screen menu?
The image map of the Map (screen #2) is between the two screens and it works perfectly fine, so I would assume that the issues are separate.
I'm going to try to do the dress-up game over but I'm really not an experienced programmer so... yes. In any case, any theories with the second menu?
- pyopyon
- Veteran
- Posts: 451
- Joined: Thu Aug 29, 2013 4:35 am
- Completed: https://chouette.itch.io/
- Projects: Ocean Pearls, Catching the Fox [NaNo16], Singles
- Organization: Jellyfish Parade
- Tumblr: jelpiparade
- Skype: miss.chouette
- Soundcloud: pyopyon
- itch: chouette
- Contact:
Re: I think I broke the Save function...
I seriously have no idea what I'm doing and I haven't been able to figure it out on my own at all...
I think my only alternative is me going to have to just disable the save option altogether, because I can't fix it.
The problem with that is because there are so many love interests, besides that the game really does have high replay value so it's such a problem that I've knocked out the save function...
I really need help orz;;
I think my only alternative is me going to have to just disable the save option altogether, because I can't fix it.
The problem with that is because there are so many love interests, besides that the game really does have high replay value so it's such a problem that I've knocked out the save function...
I really need help orz;;
Who is online
Users browsing this forum: No registered users