alexa-samples / skill-sample-nodejs-quiz-game

An Alexa Skill Sample showing how to build a quiz game skill.
Other
265 stars 289 forks source link

all wrong answers #48

Closed repath closed 5 years ago

repath commented 6 years ago

Dear Team, First of all, thank you for the tutorial and the detailed step to use the code as is: the issue, I encountered is that, even I tell the correct answer, it says "that answer is wrong" but gives the same answer as correct answer. I don't know, how to modify the code. can you please help. with regards Riphath Athyala

alizamill commented 6 years ago

I am having the same problem. Did you figure out how to fix the bug?

DarrenBro commented 5 years ago

I've had the same problem as above with a different repo. https://github.com/alexa/skill-sample-nodejs-trivia/pull/89

I created a pull request to address the issue. Basically the the intent that comes from alexa looks like the below;

"intent": { "name": "AnswerIntent", "confirmationStatus": "NONE", "value": "1", "slots": { "item": { "name": "item", "value": "1", "confirmationStatus": "NONE", "source": "USER" } } }

The code looks for intent.slots.Answer.value but it should be intent.slots.item.value.

DarrenBro commented 5 years ago

This repo might have a similar issue but can't be sure, however you can download this branch and run it against your skill.

https://github.com/DarrenBro/skill-sample-nodejs-trivia/tree/answerSlotValidXPathUpdate

franklin-lobb commented 5 years ago

I was unable to repro this issue for most question type. There's an issue if you speak the order of statehood as 'first' vs. 'one'. The other responses seem to map fine. Were you experiencing this with all question types, or just specific ones? If you can tell me the question and your answer, it'll help narrow down where the issue is.

DarrenBro commented 5 years ago

I believe it the issue fell down to aws lambda updates to intent.slots.Answer.value but it should be intent.slots.item.value. I fixed the issue for myself and provided my branch change so all good. Thank you.

franklin-lobb commented 5 years ago

fair enough. if you have further questions, please don't hesitate to ask.