From e59ed4d48f3da0af14c0d0ecac37e31a4ed83851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D1=81=D0=BB=D0=B0=D0=B2=20?= =?UTF-8?q?=D0=A1=D1=83=D1=85=D0=BE=D0=B2?= <22411953+Vladislav4KZ@users.noreply.github.com> Date: Fri, 18 Feb 2022 17:30:29 +0600 Subject: [PATCH] fix: display message about missing camp points Related to: https://github.com/yapb/yapb/issues/306 --- src/control.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/control.cpp b/src/control.cpp index 34a3000..76a1f68 100644 --- a/src/control.cpp +++ b/src/control.cpp @@ -844,7 +844,11 @@ int BotControl::cmdNodeIterateCamp () { m_campIterator.push (i); } } - msg ("Ready for iteration. Type 'next' to go to first camp node."); + if (!m_campIterator.empty ()) { + msg ("Ready for iteration. Type 'next' to go to first camp node."); + return BotCommandResult::Handled; + } + msg ("Unable to begin iteration, camp points is not set."); } return BotCommandResult::Handled; }