Hi, I am currently working on a little project in which I’d like to make some new flags. Additionally, I would be redefining some in-built variables, such as V-EXAMINE, V-WEAR, V-UNWEAR. My idea would be that these flags, and redefined verbs would just be in some file I could insert into my project, like an extension. However, I am, for some reason having this really weird issue where after setting EXTRA-FLAGS to include the new flags needed and made by the extension, it suddenly doesn’t know those symbols at all. I did my best to boil this down as simple as I could to find the bug, here’s the code.
"Game - Main"
<CONSTANT GAME-BANNER "Test Game">
<CONSTANT RELEASEID 1> <VERSION ZIP>
;"Including game files"
<INSERT-FILE "Parser">
<INSERT-FILE "Redefine">
<ROOM TEST-ROOM (DESC "Test Room")
(LOC ROOMS)
(FLAGS RLANDBIT LIGHTBIT)>
<ROUTINE GO ()
<SETG HERE ,TEST-ROOM>
<MOVE ,PLAYER ,HERE>
<CRLF> <V-VERSION>
<CRLF> <V-LOOK>
<MAIN-LOOP>>
"Game - Redefine"
<SET REDEFINE T>
<SETG EXTRA-FLAGS '(FUNBIT WACKYBIT ZANNYBIT VERYCOOLBIT)>
<ROUTINE FOOBAR ()
<=? ,WACKYBIT ,ZANNYBIT>
<RTRUE>>
<ROUTINE V-WEAR ()
<FSET? ,PRSO ,WACKYBIT>
;"~~REST OF NORMAL V-WEAR DEFINITION~~">
<ROUTINE V-EXAMINE ("AUX" P (N <>))
<N=? ,ZANNYBIT ,VERYCOOLBIT>
;"~~REST OF NORMAL V-EXAMINE DEFINITION~~">
When trying to compile this with ZILF 0.9, whenever it comes upon those tags within Redefine.zil outside of their definition in EXTRA-FLAGS, be it in the routine FOOBAR, or the redefined verbs, it says something along the lines of: undefined global or constant: . I have tried various things to fix this, such as redefining the verbs and defining the tags in the main file, didn’t work, not redefining any builtin verbs, didn’t work. What is going on here? How do I fix this?
EDIT: After some tinkering around on my own, and so it looks like everything will compile with NO problems, IF the line defining all of those new tags are in the Main file… what on earth, why is that? More confusing to me is that the line MUST be before we include the parser with the INSERT-FILE routine. Am I missing something?