I am new to chatscript and am trying to teach a bot madlibs. My code seems straightforward to me, but isn’t working right. Here’s what I have as a test:
topic: ~MADLIB keep ()
u: (madlib)
$issue = madNoun
Give me a noun
u: ($issue=madNoun _*) give me another noun
$madNoun = _0
$issue = madNoun2
u: ($issue=madNoun2 _*) give me an adjective
$madNoun2 = _0
$issue = madAdj
u: ($issue=madAdj _*) give me another adjective
$madAdj = _0
$issue = madAdj2
u: ($issue=madAdj2 _*)
$madAdj2 = _0
$issue = null
n My poem n Roses are $madAdj n $madNoun are blue n $madNoun2 is $madAdj2 n And so are you! nn Do you want to make another madlib?
a: (~yes)
$issue = madNoun
Give me a noun
a: (~no)
$issue=null
oh, ok then
t:
Do you want to play a madlib?
a: (~yes)
$issue = madNoun
Give me a noun
a: (~no)
$issue = null
Oh, ok then
And here is the conversation I keep getting:
scalen: > madlib
Iris:
My poem
Roses are unknown-word
unknown-word are blue
unknown-word is unknown-word
And so are you!
Do you want to make another madlib?
scalen: > yes
Iris:
My poem
Roses are yes
~yes are blue
~yes is yes
And so are you!
Do you want to make another madlib?
Can anyone spot what is wrong? It seems the bot is taking the one input and pushing itself through each step when I think it should be stopping for each input