Batch file.... whats wrong?

hello, i'm not college yet and just asking 4 the errors of my batch file... does this server does batch file? if so please help me whats wrong w my batchfile cuz the deadline of dis is in friday HLWPPLHWLPH
6 Replies
zwitt
zwittOP•4w ago
@ECHO OFF title Liyue's Dining! Color 0B Echo ----------------------------- Echo | Xiangling's Restaurant | Echo ----------------------------- Color 09 Pause Echo +---------------------------+ Echo | Welcome to Liyue Dining! | Echo | Enjoy your meal! | Echo +---------------------------+ Pause Echo ============================ Echo Here's the menu: ~';.! * Echo ============================ Echo - Soup Slime = 1,020 mora Echo - Chili Sticky Rice = 1,500 mora Echo - Chili Glazelillies = 5,400 mora Echo - PaimonLicious = 50 mora Echo - Beef Lotus = 2,400 mora Echo - Cup of Mix = 10,000 mora Echo - Salvation of Flavors = 1,500,000 mora Echo ============================ Pause set name="Guoba" Echo This is Xiangling's assistant, %name% for order! *, Echo Taking your order, Noting it up! %name% is taking... Pause Echo *, Listing orders... Echo 1. Chili Glazelillies Echo 2. Paimonlicious Echo 3. Cup of Mix Echo Total: 15,450 mora Pause CLS Echo Your order will be in 30 minutes, waiting minute start. Pause Echo %DATE% Echo %TIME% Pause Echo During the wait, you may as well visit our sites if you want! Echo - - - - - - - - - - - - - - - - - - *, Echo Facebook - Liyue's Best Restaurant Echo Youtube - Xiangling's Restaurant Echo Twitter - Liyue's Best Restaurant Echo Instagram - Xiangling'S Restaurant Echo - - - - - - - - - - - - - - - - - - *, Pause CLS Echo - - - - - - - - - - - - *, Echo Name - Xiangling's Restaurant Echo Contact Number - 0991 234 5678 Echo Address - Liyue, China Echo - - - - - - - - - - - - *, Pause Echo Time Check of Order = %TIME% Color 0A Pause CLS Echo +---------------------------+ Echo * Confirm Your Order? * Echo * [A] Yes [B] No * Echo +---------------------------+ Choice /c AB /m "Press A to Confirm, B to Decline" If %errorlevel%==1 goto MoreOrder If %errorlevel%==2 goto Exit :Exit Echo Thank you for visiting Xiangling's Restaurant, see you next time! Pause Exit :MoreOrder Echo Confirmed! Thank you, traveler! Echo Total Spend: 15,450 mora Pause CLS Echo 30 minutes had passed. Echo Order is served in Table 1! Pause CLS Echo Serve more customers? Echo [S] "Serve" Echo [I] "Ignore" Choice /c SI /m "Press S to Serve, I to Ignore customers" If %errorlevel%==1 goto Serve If %errorlevel%==2 goto Ignore :Ignore Echo +10 bad rating of the restaurant. Oh no! Pause goto Exit :Serve Echo Going right up to Table 2! Echo This day is going to be long... Pause CLS its not fully finished yet i did it in notepad but when i try to look at the batch file, its NOT POPPING UP AND IM TRYING TO LOOK WHATS WRONG W IT 😭 if u ask me if its genshin impact inspo, yes it is
FrothyMarrow
FrothyMarrow•4w ago
What do you mean by look at it? Are you trying to run it? Did you save it as a .bat file?
zwitt
zwittOP•4w ago
YES I MEANT RUN IT, i did save the notepad as .bat file i uhhhhh redo it again, my problem rn is that the other commands that i put doesn't come out and js exits me
FrothyMarrow
FrothyMarrow•4w ago
It is happening because you are passing ‘|’ to Echo which is a special character in batch that is used for other purposes. This causes the subsequent pause to fail You need to escape them for batch to see it just as a normal character and not some command
Echo ^| Xiangling's Restaurant ^|
Echo ^| Xiangling's Restaurant ^|
Like this with '^'
zwitt
zwittOP•4w ago
OH OKAY wait i did this and it still wont run to another part 😭 it just exits me out immediately
FrothyMarrow
FrothyMarrow•4w ago
Put pause after each statement and see where it exits out without pausing

Did you find this page helpful?