0
此批處理腳本始終給出答案「您可以設置0」而不是其他選項。 我在這裏做錯了什麼?不能在批處理腳本中有條件地更改變量
set /a foodcalc=0
set /a dish=0
set /a food1=1
set /a food2=2
set /a food3=3
set /a food4=4
SET /a foodcalc=4*%random%/32768+1
IF foodcalc==1 set /a dish food1
IF foodcalc==2 set /a dish food2
IF foodcalc==3 set /a dish food3
IF foodcalc==4 set /a dish food4
echo You make some %dish%.
ping localhost -n 3 >nul
goto actualgame
哦,對了!這是=我忘記了,謝謝! – Zimano