However, if I use that exact example I get a compilation error:
Inform 6.43 for MacOS (in development)
line 45: Error: Expected an opcode name but found read_char
> [ PressAnyKey k; @read_char
Compiled with 1 error (no output)
I feel like I’m missing something obvious here but I have no idea what.
That’s the error you get if you try to compile that line in Glulx. Glulx does not have a @read_char opcode; input is too complicated to handle with single opcodes.
If you’re writing a game with the I6 library, call KeyCharPrimitive(). If you’re writing I6 code from the bare metal, you’ll need to learn enough about the library to reimplement KeyCharPrimitive(). :)