Solved Hello Can anyone help fix my batch

July 7, 2016 at 00:59:26
Specs: Windows 7
Hi my friend made this batch and when it gets to the end it crashes instead of playing the next text
here is the code

@echo off
title battlefield 1
echo battlefield 1
echo Enter Name
set /p name=
set pick=7
goto start
set /a pick=%pick% -1
set lvl=1
set armor=0
set /a ac=(10 +((%lvl% /2) +%armor%))
set setscore=%pick% +10
echo What will your %pick%th highest stat be?
echo 1 sniper
echo 2 rifleman
echo 3 smg
echo 4 lmg
echo 5 airplane
echo 6 blimp

set /p chsc=choice1~6
if %chsc%==1 set /a sni=(%setscore% +(%lvl% /2))
if %chsc%==2 set /a rif=(%setscore% +(%lvl% /2))
if %chsc%==3 set /a smg=(%setscore% +(%lvl% /2))
if %chsc%==4 set /a lmg=(%setscore% +(%lvl% /2))
if %chsc%==4 set /a air=(%setscore% +(%lvl% /2))
if %chsc%==4 set /a bli=(%setscore% +(%lvl% /2))

if %pick%==0 goto charstats
if %pick%==0 cls
goto start
echo %name%
echo sniper %str%
echo rifleman %con%
echo smg %dex%
echo lmg %int%
echo airplane %wis%
echo blimp %cha%
echo AC %ac%
color 2

echo You are sent to the western front tasked to eliminate an elite sniper spotter team known as glaz and paliz, russian
echo for the eye and the finger an eye to spot the target and a finger to pull the trigger

See More: Hello Can anyone help fix my batch

Report •

July 7, 2016 at 12:24:30
✔ Best Answer

if %pick%==0 cls
goto start


if %pick%==0 (
) else (
goto start

Also, if %pick%==0 cls won't be executed because the same statement ( if %pick%==0 goto charstats) is executed on the line before.

Don't worry if plan A fails, there are 25 more letters in the alphabet ;)

message edited by RainBawZ

Report •

July 7, 2016 at 21:19:20
Ok It Works I Fixed it

Report •

Related Solutions

Ask Question