ThePix / QuestJS

A major re-write of Quest that is written in JavaScript and will run in the browser.
MIT License
66 stars 12 forks source link

Tutorial article outdated reference to player #70

Closed mvultgmr closed 2 years ago

mvultgmr commented 2 years ago

I finally have time to go through the tutorial and learn the new QuestJS system! I'm so excited.

I found a possibly outdated reference in the tutorial about commands: if (player.loc != "garage") return falsemsg("There is nothing to charge the torch with here.")

That code produced a "player not defined" error in the consol. By reading the documentation elsewhere, I learned it should actually be game.player.loc

ThePix commented 2 years ago

Actually it is the documentation elsewhere that is out-of-date. There should be a "player" global variable.

I have gone though the tutorial, and found some errors: The name for the charge command has to be Charge (not EgCharge). The response for charge on the torch is missing a { at the start of the string, once adapted for NPCs. When you get to complex mechanisms, I missed out the charger altogether, and testPutIn should be testDropIn

However, I cannot see how you got the error you did.

I have uploaded to game-tut the game files I created; you can compared to what you have.

ThePix commented 2 years ago

Closing as I think it is resolved, and no further comments from issue starter