### Numbers in batch game code not making sense

Posted:

**22 Jan 2019 16:08**I am having trouble with this line in a game that I am making. It is pretty simple, but for some reason the numbers aren't adding up.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" echo.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" echo This chest is locked, and you do not have the key.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" echo.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" echo 1) Leave.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" echo 2) Try to pick the lock.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" echo.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" set /p c2=

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "1" goto monstore2

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" GTR "99" echo.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" GTR "99" echo Success. You have picked the lock.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" GTR "99" echo.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" GTR "99" pause

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" GTR "99" set /a storeval9=1

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" LEQ "99" echo.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" LEQ "99" echo Failure. You have cannot pick the lock.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" LEQ "99" echo.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" LEQ "99" pause

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" LEQ "99" goto chestopen1

So I think that the problem has to be with the numbers %plloc% and "99." Plloc is set to 145, and when I leave the value that it needs to be greater than at 99,

it always sends me to failure, but when I put it to 100, it always sends me to success. Do values of three digits or more require some other kind of notation? It seems like it's only reading the first two digits when numbers are greater than 99...

Forgive me if I'm not using any of the right terminology. I am entirely new to coding, and only know a tiny bit about batch and about coding in general.

Thank you so much in advance!

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" echo.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" echo This chest is locked, and you do not have the key.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" echo.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" echo 1) Leave.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" echo 2) Try to pick the lock.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" echo.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" set /p c2=

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "1" goto monstore2

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" GTR "99" echo.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" GTR "99" echo Success. You have picked the lock.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" GTR "99" echo.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" GTR "99" pause

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" GTR "99" set /a storeval9=1

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" LEQ "99" echo.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" LEQ "99" echo Failure. You have cannot pick the lock.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" LEQ "99" echo.

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" LEQ "99" pause

if "%storval9%" == "0" if "%c%" == "1" if "%keyval2%" == "0" if "%c2%" == "2" if "%plloc%" LEQ "99" goto chestopen1

So I think that the problem has to be with the numbers %plloc% and "99." Plloc is set to 145, and when I leave the value that it needs to be greater than at 99,

it always sends me to failure, but when I put it to 100, it always sends me to success. Do values of three digits or more require some other kind of notation? It seems like it's only reading the first two digits when numbers are greater than 99...

Forgive me if I'm not using any of the right terminology. I am entirely new to coding, and only know a tiny bit about batch and about coding in general.

Thank you so much in advance!