When variable exits fail, the enactor is told what the destination would have been
authorAri Johnson <ari@cobramush.org>
Wed, 21 Feb 2007 14:26:29 +0000 (14:26 +0000)
committerAri Johnson <ari@cobramush.org>
Wed, 21 Feb 2007 14:26:29 +0000 (14:26 +0000)
src/move.c

index e310d5d3ddfa3b54679db8e60fcded8219f15d4f..ea471eb7320bc4bbe20acd8821a94142ba68d737 100644 (file)
@@ -423,8 +423,14 @@ do_move(dbref player, const char *direction, enum move_type type)
        case AMBIGUOUS:
          var_dest = find_var_dest(player, exit_m);
          /* Only allowed if the owner of the exit could link to var_dest */
-         if (GoodObject(var_dest) && !can_link_to(exit_m, var_dest))
-           var_dest = NOTHING;
+         if (!GoodObject(var_dest) || !can_link_to(exit_m, var_dest)) {
+           notify_format(player,
+                         T
+                         ("Variable exit destination #%d is invalid or not permitted."),
+                         var_dest);
+
+           return;
+         }
          break;
        default:
          var_dest = Location(exit_m);