[英]batch file "set was unexpected at this time"
我正在尝试创建一个用于交易项目的程序,但是每当我选择选项 b 或 c 时,它都会显示“此时设置是意外的”
echo a.) Sony NW-A55L - Php 15,616
echo b.) Astell and Kern A and futura - SE100 Php 163,842
echo c.) Apple iPod Touch (2019) - Php 7,116
echo.
echo Please select a letter to view the items specifications.
set /p ch3=Which device do you like?
echo.
if %ch3%==a echo Storage: 16GB + mircoSD expandable Screen size: 3.1-inch
if %ch3%==a echo Battery life: 45hr Dimensions: 9.7 x 5.6 x 1.1 cm Weight: 99g
if %ch3%==a echo Will you purchase this device?
if %ch3%==a set /p mp3a=Y/N:
if %mp3a%==Y set /a ag1=%total% + 15616 & echo Thank You for your purchase! Now Returning to Main Selection. & pause & cls & goto main
if %mp3a%==y set /a ag1=%total% + 15616 & echo Thank You for your purchase! Now Returning to Main Selection. & pause & cls & goto main
if %mp3a%==N echo Now returning to mp3 selections & pause & cls &goto mp3
if %mp3a%==n echo Now returning to mp3 selections & pause & cls &goto mp3
if %ch3%==b echo Storage: 128GB + microSD expandable Screen size: 5-inch
if %ch3%==b echo Battery life: 11hr Dimensions: 13 x 7.5 x 1.5cm Weight: 240g
if %ch3%==b echo Will you purchase this device?
if %ch3%==b set /p mp3b=Y/N:
if %mp3b%==Y set /a ag1=%total% + 163842 & echo Thank You for your purchase! Now Returning to Main Selection. & pause & cls & goto main
if %mp3b%==Y set /a ag1=%total% + 163842 & echo Thank You for your purchase! Now Returning to Main Selection. & pause & cls & goto main
if %mp3b%==N echo Now returning to mp3 selections & pause & cls &goto mp3
if %mp3b%==n echo Now returning to mp3 selections & pause & cls &goto mp3
if %ch3%==c echo Storage: 32GB/128GB/256GB Screen size: 4-inch Battery life: 40hr Dimensions: 12.3 x 5.9 x 0.6 cm Weight: 88g
cls
goto main
pause>nul```
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.