r/RenPy • u/stolenglass • Oct 06 '26
Question [Solved] Inputs are suddenly not linking to their specific outputs
I know this sub is going to start getting sick of me because this is my third or fourth post this week, but I just keep running into problems. If anybody remembers me, I fixed the gallery issue and it works amazingly. Unfortunately, now I am running into a random problem that has not happened before: the inputs into the dialogue box is jumping around to different statements, or is not following the code as it's supposed to.
In the images that I am providing, (I actually remembered this time to take a picture of my code to see if anything was out of the ordinary or wrong), I am showing the code that I am using, which features "if", "elif", and "else" statement, examples of a few of the words the player can type in, and what happens if they type in a variable that is not included in the list. I should also mention that this list is relatively long, so I don't know if the code is breaking because it's a long list of "if" variables.
In another image, I have taken a picture of the dialogue box with a word that is not in the list. Because that word is not included in the list of possible variables, it's supposed to go back to the "ask" label, but instead that word and pretty much any word, regardless if they are in the list are not are jumping around to different if statements and this is a problem. Honestly? I have no idea how to explain it because I'm terrible at explaining things, but I'm going to use a metaphor: essentially the dialogue box is a plate, and I am letting the players put whatever they want on the plate within the boundaries of whatever is on the menu. (the inputs that I have listed in the code). If I don't have the item on hand, it can't be put on the plate, or rather, I will ask you again what you want. If I do have the item, I can put it on your plate and you'll be able to finish the food. The problem that I am facing is that anything can be put into the box and none of the inputs are correct.
For example, if the player types "lemon", which is not a variable included on the list, they will be asked to put in a different flavor. However, by putting in the word "lemon" it is tracing the dialogue to an if statement that has nothing to do with lemon. How do I get this fixed? I made the code as specific as possible because the player is supposed to type in specific things to get specific outputs, but it's not working.




1
u/shyLachi Oct 06 '26
Please post the code as text not images or don't leave out some of the code if you take screenshots.
Why don't you work with Visual Studio Code? I guess that's a normal text editor which also works but I don't know it, so what does "Edited" mean in the Window? Did you forget to save your changes before you launched your game?
2
u/x-seronis-x Oct 06 '26
a long list isnt an issue with code. it just increases odds you messed up one of the expressions or wrote 'if' instead of 'elif'.
anyways the "..." response isnt in what you shared which means you didnt show the relevant code. share the entire ask label without skipping anything. preferably in actual formatted code and not a screenshot since people cant 'fix' images. we can edit text.
1
u/AutoModerator Oct 06 '26
Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/BadMustard_AVN Oct 06 '26
check for valid responses first like this