I thought I was being very clever editing AW Freyr’s Hybrid Choices extension such that the choices were turned into Vorple hyperlinks. I was not. When clicking on the choices, the parser gives an “I beg your pardon?” error instead of accepting the command. Any advice?
This is the edited code from Hybrid Choices.
Rule for displaying available decisions of a page (called N) (this is the display all choices rule):
populate choice lists for N;
repeat through the table of currently available choices:
let zzzz be "[index entry]";
place a link to command "[zzzz]";
say ") ";
if decision entry is a page and cdesc of decision entry is not "":
place a link to command "[index entry]" reading "[cdesc of decision entry]";
otherwise if decision entry is an object:
place a link to command "[index entry]" reading "[decision entry]";
say "[line break]" (B);
now the assigned index is 0.
1 Like
Solved. (Posting in case anyone ever tries to do the same thing and wants an answer.)
Vorple Hyperlinks cannot take commands that are just numbers. One way to get around this is to make it take word commands and change them back into numbers.
Rule for displaying available decisions of a page (called N) (this is the display all choices rule):
populate choice lists for N;
repeat through the table of currently available choices:
place a link to command "[index entry in words]" reading "[index entry]) ";
if decision entry is a page and cdesc of decision entry is not "":
place a link to command "[index entry in words]" reading "[cdesc of decision entry]";
otherwise if decision entry is an object:
place a link to command "[index entry in words]" reading "[decision entry]";
say "[line break]" (B);
now the assigned index is 0.
After reading a command:
let L be {"one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen"};
if player's command is listed in L:
repeat with X running from 1 to number of entries in L:
if player's command is entry X of L, replace player's command with "[X]";
otherwise if player's command is "zero":
replace player's command with "0".
Note that you can’t use the “Rule for choice-displaying” feature anymore if you do this. You have to go into the extension and edit the display all choices rule for every exception in how choices are displayed.
3 Likes