problem with scenariops involving multiple events!

Maniacal

the green Napoleon
Joined
Mar 13, 2005
Messages
18,778
Location
British Columbia, Canada
in scenarios with multiple events files, when i open the ms-dos bach file it only opens for 1 second, then it closes, it took me 5 mins to get a screenshot of the words, which r only on the screen for .1 seconds. :mad: :mad: as such, in games like cross&crecent and imperial rome, i can not get the events 2 work....can someone help me please? :sad:
 
You're running Windows XP, right? The choice command used in those batch files is not supported by the Windows XP command line interpreter. To run such batch files under XP, you'll require the file, choice.com (attached). Put it in your scenario directory or better still in your c:\windows\system32 directory (assuming your operating system is installed on c: drive).
 

Attachments

  • CHOICE.zip
    2.8 KB · Views: 404
What are the risks with putting the choice file in system32? Can I take it out again without permanent damage to the system? These Windows warnings are making me nervous.
 
It's completely harmless (unless of course it happens to be infected with a virus, but then it would cause problems wherever you put it). You can add/remove it without affecting anything else (except, of course, that the scenario batch files will stop working again).

Choice.com is only used to be able to create multiple-choice menus on the command prompt.

The reason that the system directory is preferred is that you'll only need one copy of choice.com. All batch files needing choice can find it.

If you put choice.com in the scenario directory, only batch files in that same scenario directory can find it. So you'd need to put choice.com in every scenario folder that needs it.

For the technically inclined: You can achieve the same thing as choice.com if you use SET /P instead. This works only on Windows NT/2000/XP. If you use this construct you avoid having to include choice.com with your scenario. You could do something like this in your batch file:

(...)

if "%OS%"=="Windows_NT" goto WinNT
choice /c:123 Please choose an option

if errorlevel 3 goto end
if errorlevel 2 goto something_else
if errorlevel 1 goto something

:WinNT
set /p choice=Please choose an option (1,2,3):

if %choice%==1 goto something
if %choice%==2 goto something_else
if %choice%==3 goto end

cls
echo Your choice was invalid. Enter a number from 1 to 3.

(...)
 
Hey, thanks for reviving this thread! I completely missed it the first time. Nice work!
 
Top Bottom