Hi there.
I’m new to TADS and I was wondering if anyone could help me out here.
I’m familiar with other programming languages like Java and Python but I think my unfamiliarity with C-like languages is getting in my way here.
I searched quite a bit online and the example I found of using inputdialog was as follows:
[code] ret := inputdialog(INDLG_ICON_WARNING, ‘What would you like to do next?’,
[’&Restore’, ‘Re&start’, ‘&Quit’],
nil, 3);
switch(ret)
{
case 1:
/* restore a game… */
break;
case 2:
/* restart the game */
restart();
break;
case 3:
/* quit */
quit();
break;
}[/code]
But when I run the game, it doesn’t seem to activate this at all. I assumed it would automatically run the switch loop when a user enters the room, but I must be wrong. My code is as follows:
[code]study: Room ‘Study’
"This study is much as you would expect. A desk stands in the middle of the
room. The way out is to the east. "
ret := inputdialog(INDLG_ICON_WARNING, 'What would you like to do next?',
['&Restore', 'Re&start', '&Quit'],
nil, 3);
switch(ret)
{
case 1:
/* restore a game... */
break;
case 2:
/* restart the game */
restart();
break;
case 3:
/* quit */
quit();
break;
}
east = hallway
;[/code]
Anyone willing to point me in the right direction here?
Thanks a million!