Hallo Leute!
Ich hab aus Spaß eine kleine Batch Datei gemacht um ArmA 2 zu starten.
JA, mir ist klar das es mit einem Launcher einfacher wäre, aber ich hatte einfach mal Lust sowas selbst zu machen.
Nuja, der Code ist unten. Was nicht funktioniert ist folgendes:
Der erste
set befehl macht den
choice befehl kaputt. Also, wenn er da ist kommt beim Starten die Meldung
Zitat von CMD.exe
Der Befehl "Choice" ist entweder falsch geschrieben oder konnte nicht gefunden werden
Wenn ich den ersten
set Befehl auskommentiere, funktioniert der
choice Befehl einwandfrei.
Desweiteren wollte ich noch z.B. die Parameter in eine Varible packen und die 2. Abfrage irgendwie weg machen, aber da kümmer ich mich später drum. Erstmal will ich dass das funktioniert. ^^
Hoffe der Code ist selbsterklärend.
Könnt natürlich gerne mal selbst Ausprobieren. xD
cheers,
B1n4ry
Code:
@echo off
set "Path=C:\Program Files (x86)\Steam\SteamApps\common\arma 2 operation arrowhead"
set "ArmA=%Path%\arma2oa.exe"
set "ArmABeta=%Path%\Expansion\beta\arma2oa.exe"
set /p CMods=<"%Path%\ClientMods.txt"
set /p ACE=<"%Path%\ACEMods.txt"
set /p TeamMods=<"%Path%\TeamMods.txt"
cd /D "%Path%"
echo Druecke die entsprechende Taste. Schliessen oder Strg+C zum abbrechen.
echo (1) ArmA2 CO Vanilla
echo (2) ArmA2 CO Vanilla+Customs
echo (3) ArmA2 CO ACE+Customs
echo (4) ArmA2 CO Teamabend
Choice /n /c "1234"
pause
if errorlevel 4 goto Team
if errorlevel 3 goto ACEC
if errorlevel 2 goto VanC
if errorlevel 1 goto Van
:Van
CHOICE /n /c "12" /M "Mit Beta? (1)Ja,(2)Nein"
if errorlevel 2 goto VanN
if errorlevel 1 goto VanJ
:VanJ
start "" "%ArmABeta%" "-nosplash" "-nofilepatching" "-skipintro" "-showscripterrors" "-maxmem=2047" "-maxvram=1024" "-world=empty" "-cpucount=6" "-beta=expansion\beta;expension\beta\expansion;"
:VanN
start "" "%ArmA%" -nosplash -nofilepatching -skipintro -showscripterrors "-maxmem=2047" "-maxvram=1024" "-world=empty" "-cpucount=6"
:VanC
CHOICE /n /c "12" /M "Mit Beta? (1)Ja,(2)Nein"
if errorlevel 2 goto VanCN
if errorlevel 1 goto VanCJ
:VanCJ
start "" "%ArmABeta%" -nosplash -nofilepatching -skipintro -showscripterrors "-maxmem=2047" "-maxvram=1024" "-world=empty" "-cpucount=6" "-beta=expansion\beta;expension\beta\expansion;" "-mod=%CMods%"
:VanCN
start "" "%ArmA%" -nosplash -nofilepatching -skipintro -showscripterrors "-maxmem=2047" "-maxvram=1024" "-world=empty" "-cpucount=6" "-mod=%CMods%"
:ACEC
CHOICE /n /c "12" /M "Mit Beta? (1)Ja,(2)Nein"
if errorlevel 2 goto ACECN
if errorlevel 1 goto ACECJ
:ACECJ
start "" "%ArmABeta%" -nosplash -nofilepatching -skipintro -showscripterrors "-maxmem=2047" "-maxvram=1024" "-world=empty" "-cpucount=6" "-beta=expansion\beta;expension\beta\expansion;" "-mod=%ACE%"
:ACECN
start "" "%ArmA%" -nosplash -nofilepatching -skipintro -showscripterrors "-maxmem=2047" "-maxvram=1024" "-world=empty" "-cpucount=6" "-mod=%ACE%"
:Team
start "" "%ArmABeta%" -nosplash -nofilepatching -skipintro -showscripterrors "-maxmem=2047" "-maxvram=1024" "-world=empty" "-cpucount=6" "-mod=%TeamMods%"