Batch file formatting? -
Batch file formatting? -
why work:
set /a num = %random% %% 5 + 1 if %num% == 1 set map=cs_assault if %num% == 2 set map=cs_italy if %num% == 3 set map=cs_office if %num% == 4 set map=de_aztec if %num% == 5 set map=de_bank srcds -game csgo -port 27016 -console +game_type 0 +game_mode 0 +mapgroup mg_casual +map %map%
but doesn't?
set /a num = %random% %% 5 + 1 if %num% == 1 set map = cs_assault if %num% == 2 set map = cs_italy if %num% == 3 set map = cs_office if %num% == 4 set map = de_aztec if %num% == 5 set map = de_bank srcds -game csgo -port 27016 -console +game_type 0 +game_mode 0 +mapgroup mg_casual +map %map%
i can't seem wrap brain around @ all.
because sec illustration creating variable called "map " not "map" , value " de_mapname" not "de_mapname"
so if alter
srcds -game csgo -port 27016 -console +game_type 0 +game_mode 0 +mapgroup mg_casual +map %map%
to
srcds -game csgo -port 27016 -console +game_type 0 +game_mode 0 +mapgroup mg_casual +map %map %
it work, otherwise there no variable map
.
batch-file
Comments
Post a Comment