In :main, I have a series of if statements within a for loop within a for loop, that's causing the program not run the for loops and crash. I don't really understand why the problem is that, so if someone could explain it, and or provide a fix that would be helpful. I do know that the problem is more specifically with the "if %bloche%" area.
Code: Select all
@echo off
title engine
setlocal enableExtensions
:pre
for %%G in (1,2,3,4,5,6,7,8,9,10) do (
for %%H in (1,2,3,4,5,6,7,8,9,10) do (
>"%%G'%%H.txt" echo o
)
)
start screen.bat
goto main
:main
timeout /t 1 >nul
>"test.txt" echo two
for %%I in (1,2,3,4,5,6,7,8,9,10) do (
>"text.txt" echo one
for %%J in (1,2,3,4,5,6,7,8,9,10) do (
set /p bloche=<"%%I'%%J.txt"
if %random% geq 31948 (
if %bloche% == o (
>"%%I'%%J.txt" echo n
)
if %bloche% == n (
>"%%I'%%J.txt" echo m
)
if %bloche% == m (
>"%%I'%%J.txt" echo W
)
if %bloche% == W (
>"%%I'%%J.txt" echo K
)
if %bloche% == K (
>"%%I'%%J.txt" echo U
)
if %bloche% == U (
>"%%I'%%J.txt" echo C
)
)
)
)
goto main