VOGONS


IF ERRORLEVEL=XX GOTO

Topic actions

First post, by robertmo

User metadata
Rank l33t++
Rank
l33t++

Fox Collection - Best of Titus (Titus 1994)

I have noticed that "IF ERRORLEVEL XX GOTO" is supported but "IF ERRORLEVEL=XX GOTO" is not. So you have to edit .bat file yourself with these games.

Reply 1 of 4, by jal

User metadata
Rank Oldbie
Rank
Oldbie
robertmo wrote:

I have noticed that "IF ERRORLEVEL XX GOTO" is supported but "IF ERRORLEVEL=XX GOTO" is not.

The correct syntax is "if errorlevel xx goto". The fact that the second syntax works also, has to do with the fact that the original DOS (at least the later versions) filters out any '=' sign as if it wasn't there. E.g. "dir=/=w" works just as well as dir /w. I can imagine DOSBox can't emulate every strange little quirk of original DOS...

JAL

Reply 2 of 4, by robertmo

User metadata
Rank l33t++
Rank
l33t++

dosbox already supports:
IF ERRORLEVEL==XX GOTO
IF ERRORLEVEL == XX GOTO
and lot's of other really freaky settings i have just tried 😉

Reply 3 of 4, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++
robertmo wrote:

Fox Collection - Best of Titus (Titus 1994)

Ha! Best of + Titus. That's an oxymoron, right? 😁

Reply 4 of 4, by robertmo

User metadata
Rank l33t++
Rank
l33t++

Dick Tracy uses this method too.