Batch File Closing When I Try To Drag Variables -


i coding (in batch) mini tycoon game. however, i'm having difficulties when executing command:

:cantbuy echo insufficient funds! pause goto shop  :buy1 set /p money<"m2df.dll" set /p cps<"m3df.dll" if %money% gtr 100 goto canbuy1 goto cantbuy :canbuy1 set /a "newmoney=%money%-100" set /a "newcps=%cps%+2" set cps=%newcps% set money=%newmoney% echo %money%>m2df.dll echo %cps%>m3df.dll echo bought! pause goto shop 

the program seems exit straight after input "1" ideas how fix this?

update: found out. decided put pause after see wrong, , syntax bad , went straight command crashing script. here's fixed script:

:cantbuy    echo insufficient funds! pause goto shop  :buy1 set /p money=<"m2df.dll" set /p cps=<"m3df.dll" if %money% geq 100 goto canbuy1 goto cantbuy :canbuy1 set /a "newmoney=%money%-100" set money=%newmoney% set /a "newcps=%cps%+2" set cps=%newcps% echo %cps% >m3df.dll echo %money% >m2df.dll echo bought! pause goto shop 

Comments