因此我创建了一个批处理文件,但每次都会出现错误“括号不平衡”。
@echo off
:top
cls
echo.
echo =========================
echo + -=-=-=-=-=-=-=-=-=-=- +
echo =========================
echo.
echo.
set /p X=Insert drop chance (1 percent = 1, 5 percent = 5):
echo.
set /p Y=Insert attempt count:
echo.
echo.
echo.
set /A A=(X / 100)
set /A B=(Y / 100)
set /A Q=(( 1 - ( 1 - A ^ B )) * 100)
echo ------------------------------------------------------------------------------
echo (1 - ((1 - (DROP CHANCE %X% / 100)) ^ (ATTEMPTS %Y% / 100) * 100 = %Q%
echo ------------------------------------------------------------------------------
echo.
echo 1 for copy, 2 for reset, 3 to close.
@CHOICE /C:123
IF ERRORLEVEL 3 EXIT
IF ERRORLEVEL 2 GOTO top
IF ERRORLEVEL 1 GOTO copy
echo.
:copy
echo %Q% | clip
pause
goto :top
错误出现在“/AQ=(( 1 - ( 1 - A ^ B )) * 100)”
请帮忙,我非常困惑为什么它不起作用。