I have solved my previous question but after editing, I started adding some lines. This is supposed to ask for the age and all that works for me is EQU and not LESS or GREA; So only "No" works. Everything else= "The syntax of the code is wrong." Thanks for helping previously, though! Possibly even this one. I can not be bothered to add 4 lines to the beginning of all my code BTW so is there any tips to help me do it quicker:
:Next1
echo You know, %name%, I just really cannot differ how old you are. I would love to know. Do not hesitate to say "No" if you would not really like to tell me, but I would like to know.
set /p age
if /i "%age%" EQU "No" goto :NoAge
if /i "%age%" LESS 12 goto :Young
if /i "%age%" GREA 12 goto :Older
:Older
if /i "%age%" LESS 18 goto :Teen
goto :Adult
:Young
echo Oh, so you are quite young, are you! Well, that is ok, we can still have a little chat!
set "%age%" Young
:Teen
Oh, a teenager... I AIN'T MESSIN' WIT' YOU!
pause
end
:Adult
echo Ah, a good old adult. Lovely!
set "%age%" Older
goto :Next2
:NoAge
echo Well, that is ok (as I did say!) So, do not worry!
goto :Next2
:Next2
pause
See Question&Answers more detail:os