Compare two numbers in a batch file

前端 未结 2 802
醉酒成梦
醉酒成梦 2021-01-28 06:04

I searched this site for my question, but I didn\'t find a solution to my problem.

The system gives a random number for the player and for the computer, from 2 to 12.

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-28 06:10

    you should search for delayed expansion (setlocal enabledelayedexpansion) and count your brackets: every opening bracket needs a closing one (there are exceptions I know, but not here). The opening bracket after if must be on the same line like if. The if parser will stop here: %bet%) because this is the first closing bracket after the last opening.

提交回复
热议问题