Main Menu
  • Welcome to The RPG Maker Resource Kit.

need some help...(.BATCH FILE~!!!.)

Started by dylman06, July 18, 2010, 03:59:10 PM

0 Members and 1 Guest are viewing this topic.

dylman06

so i've been using batch for a while now, and i don't know why, but this use  to work, now it won't!

after you enter your name, it exits, it used to work this way, but i think i'm forgetting something

i think i'm forgetting something(i know it's not complete)

echo off
cls
color F6
:MENU
echo Hello.
set /p name=Enter your name.
set /p input=Are you sure? Y/N 
if %input%==Y goto NAMEE
if %input%==N goto MENU
goto MENU
:NAMEE
cls
echo Hello %name%.  How are you? fine/sad
if %m%==fine goto FINE
if %m%==sad goto SAD
:FINE
echo Very good then, how about we play a game? Y/N
if %m%==Y goto GAME
if %m%==N exit
:SAD
echo Why?  Is it because your playing this?
echo Then let's play a game! Y/N
if %m%==Y goto GAME
if %m%==N exit
:GAME
cls
echo We will play a dungeon game. :]
echo Now you are the dot.
echo |  |   ||||||||||
echo |  | . ||||||||||
echo |_______________|
echo
echo Do you want to go north?
"Son, where is the nearest wal-mart?"
"http://www.justfuckinggoogleit.com/ you tard!"

My pokemon brings all the geeks to the yard...
Yeah...it's stuck in my head too...

Click here to feed me a Rare Candy!
Get your own at Pokeplushies!

cozziekuns

I think you need to put inverted commas around your strings. So replace:


if %input%==Y goto NAMEE
if %input%==N goto MENU


With:


if "%input%"=="Y" goto NAMEE
if "%input%"=="N" goto MENU



dylman06

Quote from: cozziekuns on July 18, 2010, 04:21:15 PM
I think you need to put inverted commas around your strings. So replace:


if %input%==Y goto NAMEE
if %input%==N goto MENU


With:


if "%input%"=="Y" goto NAMEE
if "%input%"=="N" goto MENU




no, that doesn't work, quotes aren't needed after == unless specified 
"Son, where is the nearest wal-mart?"
"http://www.justfuckinggoogleit.com/ you tard!"

My pokemon brings all the geeks to the yard...
Yeah...it's stuck in my head too...

Click here to feed me a Rare Candy!
Get your own at Pokeplushies!

cozziekuns

Well, I put it in and it seems to work.

Btw, are you getting a syntax error?

dylman06

Quote from: cozziekuns on July 18, 2010, 04:39:27 PM
Well, I put it in and it seems to work.

Btw, are you getting a syntax error?
no, it just quits :/

i am going to fix it D: it will take kinda forever...because my computer did have a porn virus because someone left a fishing website up for 2 months (my dad never turned it off because the monitor was burnt) so :D time to fix it!
"Son, where is the nearest wal-mart?"
"http://www.justfuckinggoogleit.com/ you tard!"

My pokemon brings all the geeks to the yard...
Yeah...it's stuck in my head too...

Click here to feed me a Rare Candy!
Get your own at Pokeplushies!

cozziekuns

It's probably because you don't have any input sets after the first one, so it just echoes what's left and then quits. If that's not it, then I don't see what's wrong with it.

dylman06

Quote from: cozziekuns on July 18, 2010, 05:04:38 PM
It's probably because you don't have any input sets after the first one, so it just echoes what's left and then quits. If that's not it, then I don't see what's wrong with it.
i'm going to try to dumb it down
"Son, where is the nearest wal-mart?"
"http://www.justfuckinggoogleit.com/ you tard!"

My pokemon brings all the geeks to the yard...
Yeah...it's stuck in my head too...

Click here to feed me a Rare Candy!
Get your own at Pokeplushies!

dylman06

Quote from: cozziekuns on July 18, 2010, 05:04:38 PM
It's probably because you don't have any input sets after the first one, so it just echoes what's left and then quits. If that's not it, then I don't see what's wrong with it.
sorry for bump, but i fixed it :D
the input was what i was missing

echo off
cls
:MENU
echo Hello.
set /p name=Enter your name.
set /p input=Are you sure? Y/N
if %input%==Y goto NAMEE
if %input%==N goto MENU
goto MENU
:NAMEE
cls
echo Hello %name%.  How are you? fine/sad
set /p m=
if %m%==fine goto FINE
if %m%==sad goto SAD
:FINE
echo Very good then, how about we play a game? Y/N
set /p m=
if %m%==Y goto GAME
if %m%==N exit
:SAD
echo Why?  Is it because your playing this?
echo Then let's play a game! Y/N
set /p m=
if %m%==Y goto GAME
if %m%==N exit
"Son, where is the nearest wal-mart?"
"http://www.justfuckinggoogleit.com/ you tard!"

My pokemon brings all the geeks to the yard...
Yeah...it's stuck in my head too...

Click here to feed me a Rare Candy!
Get your own at Pokeplushies!