Display a menu after a nudge

I want to display a menu when the robot recieve a nudge, so i override the ABMSNNudge. But if i input "1" when the menu appear after a nudge, the robot told me that he couldn't identify like "I am sorry, I didn't get that..."etc . But if i input "h", then input "1", the robot could say "a". Who can tell me why?

Code Snippet

? h
call Main_Menu()

procedure overrides ABMSNNudge()
call Main_Menu()

procedure Main_Menu()
- item1{call = A()}
item2{call = B()}
item3{call = C()}

procedure A()
- a

procedure B()
- b

procedure C()
- c

[1062 byte] By [CECILIA1123] at [2008-2-26]
# 1

The syntax may be a little off, at least in your example. Your menu should look like this:

Code Snippet
procedure MainMenu()
- item1 {call A()}
item2 {call B()}
item3 {call C()}

You should only use the "=" sign in the enumeration when calling an action

Code Snippet
procedure MainMenu()
- item1 {action = A()}
item2 {action = B()}
item3 {action = C()}
action A()
- a
action B()
- b
action C()
- c

If you use an action, however, the enumeration will break. That is, you can't pick 1, then 2. If you call the procedure in the enumeration, you can keep picking different numbers.

TomRagle-MSFT at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Windows Live Agents Development...
# 2

Sorry I make a syntax error. But even I fixed my error, the menu after recieved a nudge is still a noneffective enumeration.

I tested the menu on the MSNActivityMusic by just changed the "procedure overrides ABMSNNudge()".

Code Snippet

### Receiving
procedure overrides ABMSNNudge()
# - Ooooh... I'm all vibrating!
# - Wow. To you it's just a nudge. To me, it's like an earthquake!!
- item1 {call A()}
item2 {call B()}
item3 {call C()}

procedure A()
- aaaa

procedure B()
- bbbb

procedure C()
- cccccc

Unfortunately, after I picked 1, the robot still told me "I am sorry, I don't know what you mean by that.
If you need help, just tell me. I'll show you what I can do."

How could I deal with it?
CECILIA1123 at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Windows Live Agents Development...
# 3

When you have a dialog after an event, you may need to use the "set user conversation" directive. This worked for me:

Code Snippet

procedure A()
- aaaa

procedure B()
- bbbb

procedure C()
- cccccc


procedure overrides ABMSNNudge()
set user conversation
- item1 {call A()}
item2 {call B()}
item3 {call C()}

TomRagle-MSFT at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Windows Live Agents Development...

Windows Live Developer Forums

Site Classified