My batch script was working fine until I tried to add some long if statements. Im new to this and would like if someone could check whats wrong. Im trying to do a pricing calculator based on what rank you are.
Heres the section of it that isn't working.
if "%drating%" < "1500" (@set /a price=%price%+3)
else if "%drating%" < "2000" (@set /a price=%price%+5)
else if "%drating%" < "2500" (@set /a price=%price%+6)
else if "%drating%" < "2700" (@set /a price=%price%+8)
else if "%drating%" < "3000" (@set /a price=%price%+10)
else if "%drating%" < "3300" (@set /a price=%price%+12)
else if "%drating%" < "3500" (@set /a price=%price%+14)
else if "%drating%" < "3800" (@set /a price=%price%+20)
else if "%drating%" < "3900" (@set /a price=%price%+30)
else if "%drating%" < "4000" (@set /a price=%price%+40)
else if "%drating%" < "4100" (@set /a price=%price%+50)
else (
echo There is no available price for %drating%.
echo Press any key to exit.
set /p exitkey=
)
Aucun commentaire:
Enregistrer un commentaire