I was just wondering if anyone here is familiar with BATCH as a programming language.
Yes, I know C++ is the way to go when programming, but I’ve always had a soft spot for BATCH and I enjoy going back into it sometimes.
Unfortunately, I have a problem that has plagued me far too long.
Does anyone know how one would block commands.
In other words let’s say this is my CMD game screen:
Welcome to the game.
Type “hi” to say hi.
Type “bye” to say bye.
In my current state, if I were to type “yes,” the game will just take that as the input, therefore bringing the player into the next screen as if they typed “hi.”
What I want to do is disable any other word inputs except for “hi” and “bye.” If the player were to type “yes” I would like an echo of “I do not understand.”
why in batch?
To disable input you have if (condition) goto: back to question.
Write exactly what you need in C here or pseudocode, should be easy to translate into batch.
Well some thing are however impossible in ms batch, you need some extended things like tcc.
My game was based off of number inputs (the player would have to pick the number of the choice they wanted).
All I needed to do was add an IF Statement that stated if the input number is greater than the last number of the choices it would state that the input is invalid.
Thanks for the link, its a lot more organized than my syntax pages (which are all over the place).