First post, by kroltan
Okay, the problem with SET /P was answered by Qbix:
wrote:SET /P is a NTVDM construct.
Not support in MS DOS 5.0
Use choice
And the actual problematic functionality was solved by aqrit:
wrote:maybe use a .bat instead of .txt for config data then have each line in "LASTGAME.BAT" like […]
maybe use a .bat instead of .txt for config data
then have each line in "LASTGAME.BAT" likeSET line1=blahSET line2=weeeSET line3=splat
And finally, the final .bat ended up like this:
@echo offif "%1"=="" goto _loadgoto play_%1echo You don't have "%1" configured!goto _end:play_lemmingscd lemmingscall cgalemmi.exegoto _save:play_quakecd quake_swcall quake.exegoto _save:play_warcraftcd warcraftcall war.exegoto _save:_savecd ..echo call play %1 > LASTGAME.BATgoto _end:_loadcall lastgame.batgoto _end:_endcls
Thanks to all persons who helped me, and lastly, sorry for my bad english, it's my second language.
------------------------ORIGINAL POST-----------------------------
Not related to games, but actually a BAT file I'm creating to run games. ("Why not shortcuts?" Well that feels kind of out of place and boring to me)
The problem I'm having is when I try to load a text file that stores the last played game, DOSBox hangs and the console just spams:
SHELL:Redirect input from LASTGAME.TXT
And the DOS window crashes, forcing me to kill the process.
This is the file:
@echo offIF "%1"=="" (goto lastplayed)goto %1echo You don't have "%1" configured!goto end:lemmingsecho Starting Lemmings!cd lemmingscall cgalemmi.exegoto save:savecd ..echo %1 > LASTGAME.TXTgoto end:lastplayedset /P _lg=<LASTGAME.TXTcall play %_lg%:end
The content is being saved fine, if I use "play lemmings", after the game exits the bat is saved with the content: lemmings
I tested it outside DOSBox and it loads the file correctly, so I guess it's a DOSBox problem. I tried the FOR technique, but it just hangs too without messages.
My computer's specs:
Motherboard: Pegatron IPM41-D3
Processor: Intel Pentium E5600 @3.2GHz (dual-core)[/code]