title: How to make an external goto not break a for loop in batch
body: <p>So I have a script that I'm writing as a pet project that seemed simpler than it turns out to be...I have a for loop that is meant to increment a certain amount of times based on user input but in the for loop, I have a destination statement for a goto earlier in the script. The issue is that when that goto is used it breaks the for and causes the for loop to only provide 1 answer. </p>
  
  <p>Here is the code:</p>
  
  <pre><code>for /l %%x in (1, 1, %player%) do (
  :defense
  call :defenders
  :defense_return
  call :colorEcho 0e %operator%
  echo.
  )
  </code></pre>
  
  <p>The :defense_return is the culprit but it's neccesary because I'm using %RANDOM% so I need it to reference back to when the %RANDOM% is used or else I just get the same output when I really want 2 different outputs.</p>
  
  <p>here is the defenders block:</p>
  
  <pre><code>:defenders
  set /a operator=%random%%%18+1
  REM 707th SMB
  if %operator%== 1 set operator=Vigil
  REM G.R.O.M
  if %operator%== 2 set operator=Ela
  REM S.D.U
  if %operator%== 3 set operator=Lesion
  REM G.E.O
  if %operator%== 4 set operator=Mira
  REM S.A.T
  if %operator%== 5 set operator=Echo
  REM BOPE
  if %operator%== 6 set operator=Caviera
  REM Navy Seal
  if %operator%== 7 set operator=Valkyrie
  REM JTF2
  if %operator%== 8 set operator=Frost
  REM S.A.S
  if %operator%== 9 set operator=Mute
  if %operator%== 10 set operator=Smoke
  REM SWAT
  if %operator%== 11 set operator=Castle
  if %operator%== 12 set operator=Pulse
  REM GIGN
  if %operator%== 13 set operator=Doc
  if %operator%== 14 set operator=Rook
  REM GSG9
  if %operator%== 15 set operator=Jager
  if %operator%== 16 set operator=Bandit
  REM Spetsnaz
  if %operator%== 17 set operator=Tachanka
  if %operator%== 18 set operator=Kapkan
  goto :defense_return
  </code></pre>
  
  <p>I really want to make this script work out, but this for loop is causing me issues...Any help is much appreciated!</p>