![]() |
Yes/No Scripts
Hello :)
I tried making my very first Yes/No script a few days ago, but there seems to be an error. The Script is in spoilers. The error is that whenever I click the 'No' option in-game, it wouldn't do anything, and if I clicked the A button, it would loop the Yes/No script for some reason. When I click the 'Yes' option in game however, it works as intended to. Any ideas on what I have made an error in via script? Spoiler:
|
You've used the 'if' statement for @no incorrectly. When you're checking for an exact number in a variable (in this case, 0x0 as that's what's returned when you say no) you need to have the if statement be 0x1 like this:
Spoiler:
This value is has the following meanings: Code:
Spoiler:
|
Oh... Ok then!
Thankyou for correcting my error, and the extra insights of making the script shorter. :) This will prove helpful to me in the future the next time I attempt Yes/No scripts! :D |
| All times are GMT -8. The time now is 9:14 AM. |
![]()
© 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.
Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.