Jump to content

How to use dynamic unique variable for READ_2DA_ENTRY_FORMER?


Recommended Posts

TEXT_SPRINT uniquevar ~_#_#read_%mod_folder%~
READ_2DA_ENTRIES_NOW ~%uniquevar%~ 4 // look for lines with 4 columns - diff output matching "Only in path: filename" (no spaces in filename)
SET rows = EVAL ~%%uniquevar%%~
PATCH_PRINT ~Checking for added or removed files (scanning %rows% lines in patch file)...~
FOR (i=0; i < rows; i=i+1) BEGIN
	READ_2DA_ENTRY_FORMER ~%uniquevar%~ i 0 only
	READ_2DA_ENTRY_FORMER ~%uniquevar%~ i 1 in
	READ_2DA_ENTRY_FORMER ~%uniquevar%~ i 2 path
	READ_2DA_ENTRY_FORMER ~%uniquevar%~ i 4 filename // will only get first part of file names containing spaces
Results in:


Clearing old patch files from _ORIGINALS/_PATCHES/stratagems...

Processing stratagems...
Creating 1 directory
Moving _ORIGINALS/_PATCHES/stratagems/combined.patch to _ORIGINALS/_PATCHES/stratagems/combined.patch.bak
Copying and patching 1 file ...
[_ORIGINALS/_PATCHES/stratagems/combined.patch.bak] loaded, 322479 bytes

Checking for added or removed files (scanning 2492 lines in patch file)...
ERROR: [_ORIGINALS/_PATCHES/stratagems/combined.patch.bak] -> [_ORIGINALS/_PATCHES/stratagems/combined.patch] Patching Failed (COPY) (Failure("ERROR: READ_2DA_ENTRY_FORMER failed on variable %_#_#read_stratagems_3_4%"))
Stopping installation because of error.
Link to comment


This topic is now archived and is closed to further replies.

  • Create New...