Utodev / ngPAWS

ngPAWS interactive fiction (text adventure game) authoring system. Genarates HTML/javascript games runable in any browser.
http://www.ngpaws.com
31 stars 17 forks source link

[question] Weird uses of quotation marks #33

Open cibersheep opened 6 years ago

cibersheep commented 6 years ago

You know my obsession with inverted commas :D If the user enters something like "go north" the parser will understand north but if you type "examine something" it will answer:

Pardon?
Something is blahblablba

and if you type something like: say to dwarf, "hey, how are you" or say to dwarf "hey, how are you" you get strange responses (obviously).

I know those are extreme cases. Is it supposed those cases to be taken care by the user code (with condacts)? Or is it worth me to take some time to try to clean those cases in javascript?

Utodev commented 6 years ago

I'm not sure if I understand this. When you say "inverted commas" you mean commas placed in between quotes?

I think your last orders fail just because the sentence:

say to dwarf "hey, how are you"

is split by the parser into:

say to dwarf hey how are you

just because the parser looks for "sentence separators" and both commas and quoters are (and in fact any common punctuation sign as colon, semicolon, exclamation marke, etc. plus all the conjunctions).

I think trying to fix that is not easy, but your are welcome to try.

If you meant something else, please provide more details :-)

cibersheep commented 6 years ago

Sorry... I might be using the wrong dialect :D but yes, I meant that. Happily, I have been searching for another project some replacements that might come handy here. I'll do some tests.

cibersheep commented 6 years ago

That was pretty easy.

runtime.js-noCommasInQuotes.zip