You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Module take.i contains a dubious piece of code, which we might want to fix, also in out ports to Swedish and Italian:
Syntax
take_from = 'take' (obj) 'from' (holder)
Where [...]
Add to every object
Verb take_from
When obj
Check obj not in hero -- <1>
else "You already have" say the obj. "."
And obj in holder -- <2>
else Say the obj. "is not there."
Does
If holder=hero then -- <3>
"You don't need to take things from yourself!"
else
Locate obj in hero.
"You take" say the obj. "."
End if.
End verb.
End add.
How can the following code ever execute:
Does
If holder=hero then -- <3>
"You don't need to take things from yourself!"
if checks <1> and <2> passed? i.e.:
The obj is not in Hero.
The obj is in holder.
The hero can't possibly be the holder of obj at point <3>!
Or am I missing out something here (because it's late night and I'm half asleep)?
From my experience with libraries, it makes more sense to put absurd/nonsensical command on top of the CHECKs lists, so I'd change that to:
When obj
Check holder <> hero
esle "You don't need to take things from yourself!"
And obj not in hero
else "You already have" say the obj. "."
And obj in holder
else Say the obj. "is not there."
The text was updated successfully, but these errors were encountered:
After a brief glance it does look suspicious, and should probably be fixed as you suggest.
(One must remember that the 0.6 library was never really finished and amended over the years as Alan and our learnings grew. There are probably many such places...)
Module
take.i
contains a dubious piece of code, which we might want to fix, also in out ports to Swedish and Italian:How can the following code ever execute:
if checks <1> and <2> passed? i.e.:
The hero can't possibly be the holder of obj at point <3>!
Or am I missing out something here (because it's late night and I'm half asleep)?
From my experience with libraries, it makes more sense to put absurd/nonsensical command on top of the CHECKs lists, so I'd change that to:
The text was updated successfully, but these errors were encountered: