I’m working on a Kerkerkruip extension that uses Text Capture by Eric Eve. There’s a variable defined in Text Capture that has the name “capture_active” in I6. I include Text Capture at the beginning of the extension. But I still get the error ‘Variable must be defined before use: “capture_active”’…
Launching: ni “-internal” “/Applications/Inform.app/Contents/Resources/Internal” “-external” “/Users/mciul/Library/Inform” “-project” “/Users/mciul/git/kerkerkruip/Kerkerkruip.inform” “-format=ulx”
Inform 7 build 6L38 has started.
++ 0% (Reading text)
I’ve now read your source text, which is 859 words long.
++ 5% (Analysing sentences)
I’ve also read Standard Rules by Graham Nelson, which is 42616 words long.
I’ve also read English Language by Graham Nelson, which is 2288 words long.
I’ve also read Basic Screen Effects by Emily Short, which is 2218 words long.
I’ve also read Numbered Disambiguation Choices by Aaron Reed, which is 868 words long.
I’ve also read Glulx Entry Points by Emily Short, which is 2682 words long.
I’ve also read Dynamic Objects by Jesse McGrew, which is 1222 words long.
I’ve also read Questions by Michael Callaghan, which is 6612 words long.
I’ve also read Interpreter Sniffing by Friends of I7, which is 1761 words long.
I’ve also read Xorshift by Dannii Willis, which is 415 words long.
I’ve also read Menus by Dannii Willis, which is 1297 words long.
I’ve also read Inform ATTACK by Victor Gijsbers, which is 8625 words long.
I’ve also read Kerkerkruip Permadeath by Victor Gijsbers, which is 415 words long.
I’ve also read Kerkerkruip Persistent Data by Victor Gijsbers, which is 1378 words long.
I’ve also read Kerkerkruip Dungeon Generation by Victor Gijsbers, which is 5224 words long.
I’ve also read Kerkerkruip Events by Victor Gijsbers, which is 619 words long.
I’ve also read Kerkerkruip ATTACK Additions by Victor Gijsbers, which is 3144 words long.
I’ve also read Kerkerkruip Monster Abilities by Victor Gijsbers, which is 6853 words long.
I’ve also read Kerkerkruip Systems by Victor Gijsbers, which is 12367 words long.
I’ve also read Kerkerkruip Systems - Hiding Smoke Ethereal by Victor Gijsbers, which is 2578 words long.
I’ve also read Kerkerkruip Damage by Victor Gijsbers, which is 1590 words long.
I’ve also read Kerkerkruip Actions and UI by Victor Gijsbers, which is 7580 words long.
I’ve also read Kerkerkruip Items by Victor Gijsbers, which is 29593 words long.
I’ve also read Kerkerkruip Religion by Victor Gijsbers, which is 5945 words long.
I’ve also read Kerkerkruip Locations by Victor Gijsbers, which is 15152 words long.
I’ve also read Kerkerkruip Scenery by Victor Gijsbers, which is 1855 words long.
I’ve also read Kerkerkruip Monsters by Victor Gijsbers, which is 47152 words long.
I’ve also read Kerkerkruip Events and Specials by Victor Gijsbers, which is 4248 words long.
I’ve also read Kerkerkruip Dreams by Victor Gijsbers, which is 4291 words long.
I’ve also read Kerkerkruip Ugly Special Cases by Victor Gijsbers, which is 127 words long.
I’ve also read Kerkerkruip Start and Finish by Victor Gijsbers, which is 4420 words long.
I’ve also read Kerkerkruip Tests by Victor Gijsbers, which is 1386 words long.
I’ve also read Kerkerkruip Final Declarations by Victor Gijsbers, which is 161 words long.
I’ve also read Kerkerkruip Help and Hints by Victor Gijsbers, which is 5937 words long.
I’ve also read Kerkerkruip Automated Testing by Mike Ciul, which is 5154 words long.
I’ve also read Dynamic Tables by Jesse McGrew, which is 1979 words long.
I’ve also read Inform ATTACK Core by Victor Gijsbers, which is 3542 words long.
I’ve also read Simple Unit Tests by Dannii Willis, which is 905 words long.
I’ve also read Text Capture by Eric Eve, which is 1076 words long.
++ 15% (Drawing inferences)
++ 20% (Binding rulebooks)
++ 23% (Binding rulebooks)
++ 26% (Binding rulebooks)
++ 29% (Binding rulebooks)
++ 32% (Binding rulebooks)
++ 35% (Binding rulebooks)
++ 38% (Binding rulebooks)
++ 41% (Generating code)
++ 44% (Generating code)
++ 47% (Generating code)
++ 50% (Generating code)
++ 53% (Generating code)
++ 56% (Generating code)
++ 59% (Generating code)
++ 62% (Generating code)
++ 65% (Generating code)
++ 68% (Generating code)
++ 71% (Generating code)
++ 74% (Generating code)
++ 77% (Generating code)
++ 80% (Generating code)
++ 83% (Generating code)
++ 86% (Generating code)
++ 89% (Generating code)
++ 92% (Generating code)
++ 95% (Generating code)
++ 98% (Generating code)
The 859-word source text has successfully been translated into an
intermediate description which can be run through Inform 6 to complete
compilation. There were 81 rooms and 461 things.
++ 100% (Finishing work)
++ Ended: Translation succeeded: 81 rooms, 461 things
Inform 7 has finished.
/Applications/Inform.app/Contents/Resources/Compilers/inform6
-kE2SDwG +include_path=/Applications/Inform.app/Contents/Resources/Library/6.11,.,…/Source /Users/mciul/git/kerkerkruip/Kerkerkruip.inform/Build/auto.inf /Users/mciul/git/kerkerkruip/Kerkerkruip.inform/Build/output.ulx
Launching: inform6 “-kE2SDwG” “+include_path=/Applications/Inform.app/Contents/Resources/Library/6.11,.,…/Source” “/Users/mciul/git/kerkerkruip/Kerkerkruip.inform/Build/auto.inf” “/Users/mciul/git/kerkerkruip/Kerkerkruip.inform/Build/output.ulx”
Inform 6.33N for Mac OS X (20th August 2014)
File “/Users/mciul/git/kerkerkruip/Kerkerkruip.inform/Build/auto.inf”; Line 148062 # Error: Variable must be defined before use: “capture_active”
Global capture_active
In: 1 source code files 241403 syntactic lines
226152 textual lines 9135085 characters (ISO 8859-1 Latin1)
Allocated:
28725 symbols (maximum 30000) 28827025 bytes of memory
Out: Glulx story file 10.140924 (2702K long):
92 classes (maximum 200) 694 objects (maximum 1000)
234 global vars (maximum 512) 203476 variable/array space (maximum 500000)
211 verbs (maximum 255) 1160 dictionary entries (maximum 1300)
376 grammar lines (version 2) 428 grammar tokens (unlimited)
224 actions (maximum 250) 48 attributes (maximum 56)
40 common props (maximum 256) 411 individual props (unlimited)
568156 characters used in text 409281 bytes compressed (rate 0.720)
0 abbreviations (maximum 64) 8732 routines (unlimited)
241167 instructions of code 157470 sequence points
896512 bytes writable memory used 1870336 bytes read-only memory used
2766848 bytes used in machine 1070974976 bytes free in machine
Compiled with 1 error and 4054 suppressed warnings (no output)
Completed in 3 seconds
Compiler finished with code 1
The extension replaces some sections of Basic Screen Effects by Emily Short, and that’s where the “capture_active” variable is used. I had this working back in 6G60, but the I6 code was in the story file, not an extension. How can I get this to work?
I tried listing Text Capture first in the story file, right before Basic Screen Effects, but then I got the error 'No such constant as “INDEXED_TEXT_TY_Say”
Launching: ni “-internal” “/Applications/Inform.app/Contents/Resources/Internal” “-external” “/Users/mciul/Library/Inform” “-project” “/Users/mciul/git/kerkerkruip/Kerkerkruip.inform” “-format=ulx”
Inform 7 build 6L38 has started.
++ 0% (Reading text)
++ 5% (Analysing sentences)
I’ve now read your source text, which is 865 words long.
I’ve also read Standard Rules by Graham Nelson, which is 42616 words long.
I’ve also read English Language by Graham Nelson, which is 2288 words long.
I’ve also read Text Capture by Eric Eve, which is 1076 words long.
I’ve also read Basic Screen Effects by Emily Short, which is 2218 words long.
I’ve also read Numbered Disambiguation Choices by Aaron Reed, which is 868 words long.
I’ve also read Glulx Entry Points by Emily Short, which is 2682 words long.
I’ve also read Dynamic Objects by Jesse McGrew, which is 1222 words long.
I’ve also read Questions by Michael Callaghan, which is 6612 words long.
I’ve also read Interpreter Sniffing by Friends of I7, which is 1761 words long.
I’ve also read Xorshift by Dannii Willis, which is 415 words long.
I’ve also read Menus by Dannii Willis, which is 1297 words long.
I’ve also read Inform ATTACK by Victor Gijsbers, which is 8625 words long.
I’ve also read Kerkerkruip Permadeath by Victor Gijsbers, which is 415 words long.
I’ve also read Kerkerkruip Persistent Data by Victor Gijsbers, which is 1378 words long.
I’ve also read Kerkerkruip Dungeon Generation by Victor Gijsbers, which is 5224 words long.
I’ve also read Kerkerkruip Events by Victor Gijsbers, which is 619 words long.
I’ve also read Kerkerkruip ATTACK Additions by Victor Gijsbers, which is 3144 words long.
I’ve also read Kerkerkruip Monster Abilities by Victor Gijsbers, which is 6853 words long.
I’ve also read Kerkerkruip Systems by Victor Gijsbers, which is 12367 words long.
I’ve also read Kerkerkruip Systems - Hiding Smoke Ethereal by Victor Gijsbers, which is 2578 words long.
I’ve also read Kerkerkruip Damage by Victor Gijsbers, which is 1590 words long.
I’ve also read Kerkerkruip Actions and UI by Victor Gijsbers, which is 7580 words long.
I’ve also read Kerkerkruip Items by Victor Gijsbers, which is 29593 words long.
I’ve also read Kerkerkruip Religion by Victor Gijsbers, which is 5945 words long.
I’ve also read Kerkerkruip Locations by Victor Gijsbers, which is 15152 words long.
I’ve also read Kerkerkruip Scenery by Victor Gijsbers, which is 1855 words long.
I’ve also read Kerkerkruip Monsters by Victor Gijsbers, which is 47152 words long.
I’ve also read Kerkerkruip Events and Specials by Victor Gijsbers, which is 4248 words long.
I’ve also read Kerkerkruip Dreams by Victor Gijsbers, which is 4291 words long.
I’ve also read Kerkerkruip Ugly Special Cases by Victor Gijsbers, which is 127 words long.
I’ve also read Kerkerkruip Start and Finish by Victor Gijsbers, which is 4420 words long.
I’ve also read Kerkerkruip Tests by Victor Gijsbers, which is 1386 words long.
I’ve also read Kerkerkruip Final Declarations by Victor Gijsbers, which is 161 words long.
I’ve also read Kerkerkruip Help and Hints by Victor Gijsbers, which is 5937 words long.
I’ve also read Kerkerkruip Automated Testing by Mike Ciul, which is 5154 words long.
I’ve also read Dynamic Tables by Jesse McGrew, which is 1979 words long.
I’ve also read Inform ATTACK Core by Victor Gijsbers, which is 3542 words long.
I’ve also read Simple Unit Tests by Dannii Willis, which is 905 words long.
++ 15% (Drawing inferences)
++ 20% (Binding rulebooks)
++ 23% (Binding rulebooks)
++ 26% (Binding rulebooks)
++ 29% (Binding rulebooks)
++ 32% (Binding rulebooks)
++ 35% (Binding rulebooks)
++ 38% (Binding rulebooks)
++ 41% (Generating code)
++ 44% (Generating code)
++ 47% (Generating code)
++ 50% (Generating code)
++ 53% (Generating code)
++ 56% (Generating code)
++ 59% (Generating code)
++ 62% (Generating code)
++ 65% (Generating code)
++ 68% (Generating code)
++ 71% (Generating code)
++ 74% (Generating code)
++ 77% (Generating code)
++ 80% (Generating code)
++ 83% (Generating code)
++ 86% (Generating code)
++ 89% (Generating code)
++ 92% (Generating code)
++ 95% (Generating code)
++ 98% (Generating code)
++ 100% (Finishing work)
++ Ended: Translation succeeded: 81 rooms, 461 things
The 865-word source text has successfully been translated into an
intermediate description which can be run through Inform 6 to complete
compilation. There were 81 rooms and 461 things.
Inform 7 has finished.
/Applications/Inform.app/Contents/Resources/Compilers/inform6
-kE2SDwG +include_path=/Applications/Inform.app/Contents/Resources/Library/6.11,.,…/Source /Users/mciul/git/kerkerkruip/Kerkerkruip.inform/Build/auto.inf /Users/mciul/git/kerkerkruip/Kerkerkruip.inform/Build/output.ulx
Launching: inform6 “-kE2SDwG” “+include_path=/Applications/Inform.app/Contents/Resources/Library/6.11,.,…/Source” “/Users/mciul/git/kerkerkruip/Kerkerkruip.inform/Build/auto.inf” “/Users/mciul/git/kerkerkruip/Kerkerkruip.inform/Build/output.ulx”
Inform 6.33N for Mac OS X (20th August 2014)
In: 1 source code files 241403 syntactic lines
226152 textual lines 9135291 characters (ISO 8859-1 Latin1)
Allocated:
28725 symbols (maximum 30000) 28827029 bytes of memory
Out: Glulx story file 10.140924 (2702K long):
92 classes (maximum 200) 694 objects (maximum 1000)
234 global vars (maximum 512) 203476 variable/array space (maximum 500000)
211 verbs (maximum 255) 1160 dictionary entries (maximum 1300)
376 grammar lines (version 2) 428 grammar tokens (unlimited)
224 actions (maximum 250) 48 attributes (maximum 56)
40 common props (maximum 256) 411 individual props (unlimited)
568156 characters used in text 409281 bytes compressed (rate 0.720)
0 abbreviations (maximum 64) 8732 routines (unlimited)
241167 instructions of code 157470 sequence points
896512 bytes writable memory used 1870336 bytes read-only memory used
2766848 bytes used in machine 1070974976 bytes free in machine
File “/Users/mciul/git/kerkerkruip/Kerkerkruip.inform/Build/auto.inf”; Line 148098 # Error: No such constant as “INDEXED_TEXT_TY_Say”
Compiled with 1 error and 4054 suppressed warnings
Completed in 4 seconds
Compiler finished with code 1
Edit: looks like that’s an unrelated error. But I don’t like having to list Text Capture first… is there any way around it?
INDEXED_TEXT_TY_Say was something I copied from Simple Unit Tests by Dannii Willis. I’m guessing that’s something that changed in 6L38 - how to you say a (formerly indexed) text in I6 now?
Thanks, Zarf! That worked.
Now I’m back to the original problem. Everything was working fine until I added this line to one of my extensions (Kerkerkruip Test Sets):
assert "transcript should be capturing" based on whether or not text capturing is active;
Even though Text Capture is the very first extension included in the project, it’s saying “variable must be defined before use” all over again:
Launching: ni “-internal” “/Applications/Inform.app/Contents/Resources/Internal” “-external” “/Users/mciul/Library/Inform” “-project” “/Users/mciul/git/kerkerkruip/Kerkerkruip.inform” “-format=ulx”
Inform 7 build 6L38 has started.
++ 0% (Reading text)
++ 5% (Analysing sentences)
I’ve now read your source text, which is 881 words long.
I’ve also read Standard Rules by Graham Nelson, which is 42616 words long.
I’ve also read English Language by Graham Nelson, which is 2288 words long.
I’ve also read Text Capture by Eric Eve, which is 1076 words long.
I’ve also read Basic Screen Effects by Emily Short, which is 2218 words long.
I’ve also read Numbered Disambiguation Choices by Aaron Reed, which is 868 words long.
I’ve also read Glulx Entry Points by Emily Short, which is 2682 words long.
I’ve also read Dynamic Objects by Jesse McGrew, which is 1222 words long.
I’ve also read Questions by Michael Callaghan, which is 6612 words long.
I’ve also read Interpreter Sniffing by Friends of I7, which is 1761 words long.
I’ve also read Xorshift by Dannii Willis, which is 415 words long.
I’ve also read Menus by Dannii Willis, which is 1297 words long.
I’ve also read Inform ATTACK by Victor Gijsbers, which is 8625 words long.
I’ve also read Kerkerkruip Permadeath by Victor Gijsbers, which is 415 words long.
I’ve also read Kerkerkruip Persistent Data by Victor Gijsbers, which is 1378 words long.
I’ve also read Kerkerkruip Dungeon Generation by Victor Gijsbers, which is 5224 words long.
I’ve also read Kerkerkruip Events by Victor Gijsbers, which is 619 words long.
I’ve also read Kerkerkruip ATTACK Additions by Victor Gijsbers, which is 3144 words long.
I’ve also read Kerkerkruip Monster Abilities by Victor Gijsbers, which is 6853 words long.
I’ve also read Kerkerkruip Systems by Victor Gijsbers, which is 12367 words long.
I’ve also read Kerkerkruip Systems - Hiding Smoke Ethereal by Victor Gijsbers, which is 2578 words long.
I’ve also read Kerkerkruip Damage by Victor Gijsbers, which is 1590 words long.
I’ve also read Kerkerkruip Actions and UI by Victor Gijsbers, which is 7580 words long.
I’ve also read Kerkerkruip Items by Victor Gijsbers, which is 29593 words long.
I’ve also read Kerkerkruip Religion by Victor Gijsbers, which is 5945 words long.
I’ve also read Kerkerkruip Locations by Victor Gijsbers, which is 15152 words long.
I’ve also read Kerkerkruip Scenery by Victor Gijsbers, which is 1855 words long.
I’ve also read Kerkerkruip Monsters by Victor Gijsbers, which is 47152 words long.
I’ve also read Kerkerkruip Events and Specials by Victor Gijsbers, which is 4248 words long.
I’ve also read Kerkerkruip Dreams by Victor Gijsbers, which is 4291 words long.
I’ve also read Kerkerkruip Ugly Special Cases by Victor Gijsbers, which is 127 words long.
I’ve also read Kerkerkruip Start and Finish by Victor Gijsbers, which is 4420 words long.
I’ve also read Kerkerkruip Tests by Victor Gijsbers, which is 1386 words long.
I’ve also read Kerkerkruip Final Declarations by Victor Gijsbers, which is 161 words long.
I’ve also read Kerkerkruip Help and Hints by Victor Gijsbers, which is 5937 words long.
I’ve also read Kerkerkruip Automated Testing by Mike Ciul, which is 5256 words long.
I’ve also read Kerkerkruip Test Sets by Mike Ciul, which is 761 words long.
I’ve also read Dynamic Tables by Jesse McGrew, which is 1979 words long.
I’ve also read Inform ATTACK Core by Victor Gijsbers, which is 3542 words long.
I’ve also read Simple Unit Tests by Dannii Willis, which is 905 words long.
++ 15% (Drawing inferences)
++ 20% (Binding rulebooks)
++ 23% (Binding rulebooks)
++ 26% (Binding rulebooks)
++ 29% (Binding rulebooks)
++ 32% (Binding rulebooks)
++ 35% (Binding rulebooks)
++ 38% (Binding rulebooks)
++ 41% (Generating code)
++ 44% (Generating code)
++ 47% (Generating code)
++ 50% (Generating code)
++ 53% (Generating code)
++ 56% (Generating code)
++ 59% (Generating code)
++ 62% (Generating code)
++ 65% (Generating code)
++ 68% (Generating code)
++ 71% (Generating code)
++ 74% (Generating code)
++ 77% (Generating code)
++ 80% (Generating code)
++ 83% (Generating code)
++ 86% (Generating code)
++ 89% (Generating code)
++ 92% (Generating code)
++ 95% (Generating code)
++ 98% (Generating code)
++ 100% (Finishing work)
++ Ended: Translation succeeded: 81 rooms, 461 things
The 881-word source text has successfully been translated into an
intermediate description which can be run through Inform 6 to complete
compilation. There were 81 rooms and 461 things.
Inform 7 has finished.
/Applications/Inform.app/Contents/Resources/Compilers/inform6
-kE2SDwG +include_path=/Applications/Inform.app/Contents/Resources/Library/6.11,.,…/Source /Users/mciul/git/kerkerkruip/Kerkerkruip.inform/Build/auto.inf /Users/mciul/git/kerkerkruip/Kerkerkruip.inform/Build/output.ulx
Launching: inform6 “-kE2SDwG” “+include_path=/Applications/Inform.app/Contents/Resources/Library/6.11,.,…/Source” “/Users/mciul/git/kerkerkruip/Kerkerkruip.inform/Build/auto.inf” “/Users/mciul/git/kerkerkruip/Kerkerkruip.inform/Build/output.ulx”
Inform 6.33N for Mac OS X (20th August 2014)
File “/Users/mciul/git/kerkerkruip/Kerkerkruip.inform/Build/auto.inf”; Line 147872 # Error: Variable must be defined before use: “capture_active”
Global capture_active
In: 1 source code files 242387 syntactic lines
226990 textual lines 9172091 characters (ISO 8859-1 Latin1)
Allocated:
28820 symbols (maximum 30000) 28897860 bytes of memory
Out: Glulx story file 10.140925 (2773K long):
92 classes (maximum 200) 694 objects (maximum 1000)
234 global vars (maximum 512) 268348 variable/array space (maximum 500000)
211 verbs (maximum 255) 1163 dictionary entries (maximum 1300)
377 grammar lines (version 2) 431 grammar tokens (unlimited)
224 actions (maximum 250) 48 attributes (maximum 56)
40 common props (maximum 256) 411 individual props (unlimited)
570488 characters used in text 410879 bytes compressed (rate 0.720)
0 abbreviations (maximum 64) 8774 routines (unlimited)
242061 instructions of code 158130 sequence points
961536 bytes writable memory used 1878016 bytes read-only memory used
2839552 bytes used in machine 1070902272 bytes free in machine
Compiled with 1 error and 4048 suppressed warnings (no output)
Completed in 3 seconds
Compiler finished with code 1
zarf
(Andrew Plotkin)
September 25, 2014, 4:11pm
5
I6 source code ordering has nothing to do with I7 source code ordering.
Not “nothing”, really, but the connection is tenuous. I7 generates the I6 source code in whatever order it wants.
For extensions that include I6, the extension places its code explicitly using the “Include () before/after SECTION of TEMPLATE” phrase. Possibly Text Capture is using bad placement. Or you may need to write a function that tests the text_capture variable; functions can be called before declaration.
I looked in the code for Text Capture, and here’s the declaration:
Include (- Global capture_active = 0; -).
Do you have any recommendations for what section to place that in? After “Definitions.i6t” looks like a popular place.
I could do a patch, and also contact Eric Eve.
zarf
(Andrew Plotkin)
September 25, 2014, 4:37pm
7
... after "Global Variables" in "Output.i6t".
Not tested, but you might as well go where all the others are.
Eric_Eve
(Eric Eve)
September 25, 2014, 4:45pm
8
Unfortunately the I7 documentation doesn’t give much guidance on where I6 code should be included, but based on one example give in passing and a couple of other comments in the Extensions document you could try changing:
Part 3 - I6 Code
Include (- Global capture_active = 0; -).
In Text Capture to:
Part 3 - I6 Code
Include (- Global capture_active = 0; -) after "Definitions.i6t".
And seeing if that helps.
That looks like it worked, Eric! Would you be willing to upload an update to Text Capture with the patch?
Eric_Eve
(Eric Eve)
September 25, 2014, 5:40pm
10
I’m not entirely sure where one’s meant to upload it to these days. I’ve just emailed a copy to the email address given on the I7 website, but the set of extensions that appears there doesn’t seem to be the same as the ones that appear in the Public Library, so I’ve rather lost track of what the correct procedure is now.
Gah! I hope they sort that out…
Dannii
September 26, 2014, 3:23am
12
Even the old version of Text Capture is missing from the Inform 7 site! Could someone put the new version on github (or send it to me to put on github)?
I think I installed it via the “public library” feature of 6L38 (on a Mac). Can you get it that way?
Eric, could you send me or Dannii your latest version so we can include it in Kerkerkruip’s materials? Thanks!
Dannii
September 26, 2014, 11:05pm
14
Oh, I had forgotten to look there. Oops
I was going to link to the bug report, but I see you got there first:
inform7.com/mantis/view.php?id=1343
Eric_Eve
(Eric Eve)
September 27, 2014, 1:50pm
16
I’m away from home right now, so I don’t have a copy of the updated Text Capture to hand right now. I’ve sent an updated version to the official I7 Extensions site and had an acknowledgment from Mark Musante, but whether it’ll end up on the old extensions site or the new Public Library; I haven’t yet figured out what the procedure is (if there is one) for updating the Public Library.