Hi, I’m using the Standard Rank table in inform7, and thought I’d put the rank in the status bar. However, this causes an error.
When play begins:
now left hand status line is "[rank]";
now right hand status line is "[score]/[turn]".
I get the error: You wrote ‘“[rank]”’ , but that only works for sayable values, that is, values which I can display in text form. This isn’t one of those values: it’s a texts valued table column, a kind which isn’t sayable.
So, it sounds like I can’t use Rank in the status bar, but I was wondering if there was a different way to reference the rank that would work.
This is my first inform7 game… and my first post to intfiction. Thanks for any suggestions.
Hello and welcome! I myself only have 6 months of experience with Inform 7 programming. Tell me, could you please let us know how you declared “rank”, which doesn’t seem to be recognized by the compiler when substituting text ? Is it, for example, a thing or a value associated with a thing?
EDIT : for instance, if you wrote something like:
The player has a number called rank.
maybe you have to set:
now left hand status line is "[rank of the player]";
Unfortunately, the code that prints the player’s rank isn’t accessible in I7, only in I6. So you’re going to have to write it yourself!
To say current rank:
repeat through the Table of Rankings:
if the score is less than the score entry, break;
let the result be the rank entry;
say the result.
Table 1 - Rankings
Score Rank
0 "plain ole you"
14 "Amateur Agent"
40 "Agent"
80 "Secret Agent"
107 "Super Duper Agent"
214 "Master Super Duper Agent"
When you type “score” it lists the score as well as your rank. But as Daniel said, you can’t access the variable for printing (even though it works for the score command.