Я пытаюсь заменить stat.score
и stat.level
соответствующими переменными, но он просто печатает stat.score = 000099 для каждой строки.
Вот код:
@echo off
mode con cols=100 lines=40
setlocal EnableDelayedExpansion
:GameRender
del %cd%\assets\GameRender\pets\cthulhu\GameRender.txt
set "stat.score=000099"
set "stat.level=0"
set "Render_Ln=0"
for /L %%a in (1,1,39) do (
if !Render_Ln! EQU 39 goto :pause
set /a "Render_Ln=!Render_Ln!+1"
for /f "usebackq delims=@ skip=1" %%g in ("%cd%\assets\GameRender\pets\cthulhu\GameRender_source.txt") do set Line=%%g
echo:!Line! | findstr "stat."
if %errorlevel% EQU 0 (
set Line=%Line:stat.score=!stat.score!%
)
echo:!Line!>>"%cd%\assets\GameRender\pets\cthulhu\GameRender.txt"
)
:pause
pause
for %%a in (%cd%\assets\GameRender\pets\cthulhu\GameRender.txt) do type %%a
pause>nul
А вот и GameRender_source.txt.