I just want to ask, where is problem in this script. Every time i try to open mns fight, it just crashes somewhere on if %lokace%==2 if %vyber2%==mns set lokace=3 set monstrum=1
(btw, it's Czech game, so just ignore names)
Whole code:
:hra
cls
if %lokace%==0 echo Vesnice-domov
if %lokace%==1 echo Vesnice-namesti
if %lokace%==2 echo DabluvLes
if %lokace%==3 goto boj
echo mas %zivoty% hp
echo -----------------------------------
echo Co chces udelat?
if %lokace%==0 echo Jit na namesti [1]
if %lokace%==1 echo Jit domu [0]
if %lokace%==1 echo Jit do lesa [2]
if %lokace%==2 echo Najit monstrum [mns]
if %lokace%==2 echo Jit do vesnice [1]
if %lokace%==0 echo Vyspat se [spt]
set /p vyber2=Vyber si:
if %lokace%==1 if %vyber2%==0 set lokace=0
if %lokace%==0 if %vyber2%==1 set lokace=1
if %lokace%==1 if %vyber2%==2 set lokace=2
if %lokace%==0 if %vyber2%==spt if %zivoty% LSS %maxzivoty% set /a zivoty=%zivoty%+1
if %lokace%==2 if %vyber2%==mns set lokace=3 set monstrum=1
if %lokace%==2 if %vyber2%==1 set lokace=1
goto hra
:boj
if %monstrum%==1 set monstrumdmg=1 set monstrumhp=10
if %monstrumhp%==0 set lokace=2 set monstrum=0 goto hra
if %zivoty%==0 set lokace=0 goto hra
if %monstrumhp% GTR 0 if %monstrum%==1 echo Pavouk
echo Monstrum ma %monstrumhp% hp
echo Mas %zivoty% hp
echo Boj. Mas utok %damage% [boj]
echo Utek [utk]
set /p fight=Vyber si:
if %fight%==boj if %monstrum%==1 set /a monstrumhp=%monstrumhp%-%damage% set /a zivoty=%zivoty%-%monstrumdmg%
if %fight%==utk set lokace=2 set monstrum=0 goto hra
goto boj