Zilf is not recognizable as an internal or external command

I watched the banana retro video going over the quick start, and in the video he puts “zilf file.zil” into the cmd prompt. When I try that, I get “‘zilf’ is not recognizable as an internal or external command” etc. I am not really sure what to do, there is no real docs for this

1 Like

You need to install the zilf compiler. http://ifarchive.org/indexes/if-archive/infocom/compilers/zilf/

1 Like

0.8 is a bit old, though. You can find ZILF 0.9 at http://www.zilf.io/

1 Like

The weirdest part about this is that I already have downloaded zilf 0.9.

1 Like

You have to watch that Banana Retro guy, he’s a bit dodgy :wink:

I’m going to assume you’re using Windows, I use 0.9 also and found that I had to register ZILF otherwise I got the message you are getting. Try following these instructions on Stack Overflow…

I believe this should fix it. :slight_smile:
Adam

2 Likes

These here…

1 Like

I you don’t, for some reason, want to change your environment variables, you can alway refer to ZILF with its full path. This will work on any platform, even though I have not tried any other than the window one.

Here is an example of a batch-script I use to both compile and generate, and use, the abbreviations.

echo on
..\..\..\Source\ZIL\ZILF\zilf-0.9.0-win-x64\bin\zilf.exe -w gamefile.zil
..\..\..\Source\ZIL\ZILF\zilf-0.9.0-win-x64\bin\Zapf.exe -ab gamefile.zap > gamefile_freq.xzap
del gamefile_freq.zap
..\..\..\Source\ZIL\ZILF\zilf-0.9.0-win-x64\bin\Zapf.exe gamefile.zap
del /F /Q bin\*.*
del /F /Q zapf\*.*
move *.zap zapf\
move *.xzap zapf\
move *.dbg zapf\
move *.z? bin\
pause

2 Likes

You can always do a combination of the two. When I do batch scripts, I like to add the path right to windows path. Although this is straying from the original question, but it’s still useful.

The way that path works in the command console is that any changes to environmental variables using set only affect the command console while it runs (they’re not saved to windows), and only that one command console. If you have two open, changing the variables in one doesn’t affect the other. If you use setlocal in a batch file, it will only adjust the variables inside the batch and won’t affect those of the console that ran it.

echo off
setlocal
set path=%path%;c:\path\to\zilf\bin
zilf.exe game.zil
pause

However, my personal preference is running batches directly from the command line so I can just press “up, enter” to rerun them instead of touching the mouse. Because of that, I can pass arguments to the batch and reuse them for different source files.

For arguments, %1 is the first argument, %2 is the second, and so on. %0 refers to the batch script itself and %~dp0 is the batch’s path. I also like to set the compiler to a variable so its location in the script is separated from the calling line for clarity.

echo off
setlocal
set zilf="%~dp0\zilf\bin\zilf.exe"
set game="%~dp0\source\%1"
%zilf% %game%

You’d call it from the command line like:

compile.bat game.zil

Assuming your directory is set up like:

compile.bat
zilf/
    bin/
        zilf.exe
source/
    game.zil

That may have been info overkill. Oh well. :sweat_smile:

4 Likes

I changed the environment variables and that worked, but for some reason I am now getting this error:
ZILF 0.9 built 8/11/2019 6:30:42 AM
[error MDL0100] zilp.zil:51: syntax error: expected object or ‘>’ or ‘!>’ but found
1 error

1 Like

That message is generated by ZILF itself, telling you that it doesn’t like something in the file zilp.zil. Can you attach that file to a posting here?

1 Like

This means that the < and > doesn’t match in zilp.zil. The error is probably a couple of lines before line 51 but it’s here the compiler notices that it doesn’t line up.

1 Like

When you run the ZAPF command are you leaving ZIL as the file type or changing it to ZAP?

For example…

First command is … zilf game.zil

ZILF does it’s thing, next you type… zapf game.ZAP (rather than zil)

If it’s this then i’ll share a semi-humorous story of why I think this is the error you are getting … :slight_smile:

Adam

1 Like

The internet has permanently ruined me. I can only read ZILF as an acronym, involving zombies…

2 Likes

I was able to figure it out. Thank you all for the help.

2 Likes