You are not logged in.
Pages: 1
once the player damages the goblin it takes them to :attack_goblin_check_health and it comes up with > is unexpected at this time.
Yes i have added SETLOCAL ENABLEDELAYEDEXPANSION to the top under @echo off
:attack_goblin_check_health
cls
pause
if %goblin_health% <= 0 goto dead_goblin
if %goblin_health% >= 1 goto check_player_health_goblin
echo Not here
pause
goto attack_goblin_check_health
:check_player_health_goblin
cls
if %health% >= 1 goto attack_goblin
if %health% <= 0 goto dead_player
goto check_player_health_goblin
:attack_goblin
cls
echo /////Goblin In The Way/////
echo.
echo 1)Attack
echo.
echo 2)Heal
set /p jnm=
if %jnm% == 1 goto dam_goblin
if %jnm% == 2 goto heal_check_goblin
goto attack_goblin
:heal_check_goblin
cls
if %bandages% >= 1 goto heal_goblin
if %bandages% <= 0 goto Nobandage_goblin
goto heal_check_goblin
:Nobandage_goblin
cls
echo You have no bandages
pause
cls
goto attack_goblin
:heal_goblin
cls
set /a health += 5
set /a bandages -= 1
cls
echo You healed! You have %health% health left
pause
cls
goto attack_goblin
:dam_goblin
cls
set /a new_ran = %random% %%10 + 1 - %defense%
set /a goblin_health -= %attack%
cls
echo You did %attack% to Goblin!
pause
cls
set /a health -= %new_ran%
cls
echo Goblin Did %new_ran% to you
pause
cls
goto attack_goblin_check_health
Offline
I suggest you to type IF /? at the command prompt and read, or directly at the IF command description in this forum...
Offline
I suggest you to type IF /? at the command prompt and read, or directly at the IF command description in this forum...
Sorta helpped, just replaced the stuff with LEQ and GEQ
Offline
Pages: 1