Windows 7 [SOLVED i think..] set /p Not working properly, or If statement not working

Discussion in 'Programming and Scripting' started by Tievan, Apr 14, 2015.

  1. Tievan

    Tievan New Member

    Joined:
    Apr 14, 2015
    Messages:
    2
    Likes Received:
    0
    I'm trying to create a text-based game, but I can't get passed the menu because either "set /p" isn't taking an input, or "if '%...'" isn't seeing it. This is what I'm doing to test menus, currently

    :mmenu
    echo Main Menu
    echo Start
    echo Quit
    SET /P "a=Select "
    if "a"=="Start"
    [removed:then ]goto :start
    if "a"=="Quit"
    [removed:then ]goto :quit
    [removed:uhoh]
    echo Something Went Wrong!
    pause
    exit
    :quit
    cls
    echo It Works! Exit!
    pause
    exit
    :start
    cls
    echo It Works! Start!
    pause
    exit

    What am I doing wrong?
     
    #1 Tievan, Apr 14, 2015
    Last edited: Apr 14, 2015
  2. Tievan

    Tievan New Member

    Joined:
    Apr 14, 2015
    Messages:
    2
    Likes Received:
    0
    I made an edit, and now it's telling me what's going wrong! Seems to be working, now!
     

Share This Page

Loading...