I am having trouble getting my head around the way that Hugo handles arrays and strings. I want the user to enter a keycode, and then compare it to a pre-set string. Say my unlock code is "12345", what is the best way of dealing with this? I would expect my user to enter:
type "12345"
and then compare it to my reference. I have set up a custom routine for 'type', but no matter how I configure it, I can't get it to work.
The general code is as follows:
Code: Select all
if location = lockerroom
{
if <entered code = stored code> !pseudo code!!!!
{
"You have unlocked the door!"
}
else
{
"The keypad bleeps derisively as it rejects your code!"
}
}
else
{
"There is nothing to type on in here."
}