I'm attempting to compile Fate to Glulx, because it has reached the z8
limits (at least the non-release version has). However, I get this error:
File "auto.inf"; Line 33343 # Error: *** Statement code gen: Can't
generate yet ***
I looked at the auto.inf source, and this is the routine that is causing
the problem:
[ ReadChoice low high i;
for (::) {
print ">> ";
read buffer parse;
i = TryNumber(1);
if (i >= low && i <= high) return i;
}
];
The offending line is "read buffer parse".
Any idea how I can solve this? What might be causing it?
Regards,
Victor
Reading a line of text is too complicated to do as a single statement.
You probably want to call the KeyboardPrimitive() library routine.
--Z
--
"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..."
*
If the Bush administration hasn't subjected you to searches without a
warrant, it's for one reason: they don't feel like it. Not because of
the Fourth Amendment.
> Reading a line of text is too complicated to do as a single statement.
> You probably want to call the KeyboardPrimitive() library routine.
Thing is - all I have written myself is Inform 7 code. I have no idea
which of my Inform 7 code is translated into the offending Inform 6
code. Any ideas where I might look?
Regards,
Victor
It's not being translated; this is a piece of Simple Chat.
> It's not being translated; this is a piece of Simple Chat.
Hm! Interesting! So Simple Chat is not Glulx-compatible?
Ok, I'll try and figure out a way around this then.
Regards,
Victor
> Hm! Interesting! So Simple Chat is not Glulx-compatible?
>
> Ok, I'll try and figure out a way around this then.
The way around is easy (a Google search on "read buffer parse" is your
friend.) Where there is now "read buffer parse", write:
#ifdef TARGET_ZCODE;
read buffer parse;
#ifnot; ! TARGET_GLULX;
KeyboardPrimitive(buffer, parse);
#endif; ! TARGET_
That appears to work, and Fate now compiles to Glulx. :)
Regards,
Victor
You can actually get rid of the ifdefs, and simply have
KeyboardPrimitive(buffer, parse);
as the entire line. The Z5/Z8 version of that routine *is* just a "read
buffer parse" statement.
--Z
--
"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..."
*
If the Bush administration hasn't thrown you in military prison without trial,
it's for one reason: they don't feel like it. Not because you're an American.