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

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -