windows - My program has a missing operator even though the value is set previously. (batch) -
i made program user sets value of %bet%. when %bet% used in file says "missing operator"
set /p %bet=
this code set bet, code below code pretends %bet% doesn't exist.
:bjwinplayer echo have won! set /a %money%=%money%+%bet% set bet=0 echo play again? set /p %a5= y/n if %a5%==y goto bjbet if %a5%==n goto casgenerate if %a5%==y goto bjbet if %a5%==n goto casgenerate
set /a %money%=%money%+%bet%
should be:
set /a money=%money%+%bet%
but simple
set /a money=money+bet
also works, , simpler
set /a money+=bet
works also...
Comments
Post a Comment