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

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -