I’m returning to my first Inform project after five months away. I didn’t notice until today that Inform is giving me “yourself” instead of “you.” Maybe it’s a new problem.
> put dollar in bucket
yourself put the dollar in the donation bucket.
I’ve CTRL-f searched for “now the player is” instances. Later in the game, I switch the player character and return with “now the player is yourself”, but that hasn’t happened at this point. I don’t see any instances of messing with the standard name printing rule. What should I be looking for?
Have you made any custom report rules? If you want to change how Inform describes it when another actor does something, you need a “report someone doing something” rule (or a more specific version). If you made a “report doing something” rule instead, you might get something like what you’ve described?
“yourself” is the printed name of the default player object. It looks like you have a rule along the lines of
say "[the player] put the dollar in the donation bucket"
To have this print “you” instead, you want to change [the player] (or [player]) with [we] or [We], depending on whether you want the “you” in output to be capitalized. [We] gets printed as “you” or “I” or “she” or whatever depending on the story viewpoint.
If your story doesn’t actually change viewpoints, you can just write you in the text and not worry about any fancy substitutions.
[I’ve edited the markdown language in my question. I’m trying to say my command was “put dollar in bucket” and Inform responded with “yourself put the dollar in the donation bucket.”]
I don’t know what I might have done to cause this. I haven’t written anything to change the default response. It’s not just the dollar and the donation bucket that are affected. I can’t find any relevant rule that I wrote with the word “rule.” I haven’t learned to use “report” for anything yet.
If you’re really baffled about what part of your code could be causing an issue:
Make a backup of your code (ignore this step if you’re using version control and have been committing your changes).
Delete (or comment out) your code piece by piece, focusing on parts related to the problem functionality (so, in this case, start by removing the parts where you change the player) and keeping the remaining code in a state that will compile.
Compile your game after removing each piece and see if the problem persists.
At one point you’ll remove some code and the problem will disappear. That code may not be the direct cause of your issue, but it will certainly be related and hopefully will point you in the right direction. (Post here with what you find and I’m sure someone will help.)
This isn’t a very fun form of debugging, but when you have no idea where to look for the problem, it can be all you’re left with. (Although if you’re using version control, look into git bisect or its equivalent.)
When you say it’s not just the dollar and the donation bucket that are affected, what else is affected? It might be a rule of the form Instead of inserting something into... or After inserting something...
Have you searched for a reference to [the player] or [player]?
Everything I put into the donation bucket returns “yourself put the [noun] in the donation bucket” EXCEPT the object where I made a rule to return a custom message.
I’ve searched for “inserting” and “player.” None of those instances seem relevant.
I have found an old draft of the game that doesn’t give me the yourself error. I guess I just have to slog through a side-by-side of 6684 words to see what’s different.
Rule for printing the name of something (called unexThing):
if unexThing is not examined:
say "[printed name of unexThing]";
omit contents in listing;
otherwise:
say "[printed name of unexThing]";
I tried “x me”, but the problem persists. I tried “if unexThing is not handled:”, but the problem persists. “Rule for printing the name of a container (called unexThing):” retains the effect without the pronoun error.
It’s good to only customize the specific case you’re interested in, and let all the other cases alone. It avoids surprises. That’s what Draconis’s solution does.