From df5d5704a58bb00be445c8ae0a06cf026b2e826b Mon Sep 17 00:00:00 2001 From: Renaud G Date: Sun, 11 Oct 2015 22:04:18 +0200 Subject: -set message if Too many dice error is trigged. --- node/keepdiceexecnode.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'node/keepdiceexecnode.cpp') diff --git a/node/keepdiceexecnode.cpp b/node/keepdiceexecnode.cpp index 2ca54f4..64d53f0 100644 --- a/node/keepdiceexecnode.cpp +++ b/node/keepdiceexecnode.cpp @@ -43,6 +43,10 @@ m_previousNode = previous; { QList diceList=previousDiceResult->getResultList(); QList diceList2 = diceList.mid(0,m_numberOfDice); + if(m_numberOfDice > diceList.size()) + { + m_errors.insert(TOO_MANY_DICE,QObject::tr(" You ask to keep %1 dice but the result only has %2").arg(m_numberOfDice).arg(diceList.size())); + } foreach(Die* tmp,diceList.mid(m_numberOfDice,-1)) { -- cgit v1.2.3-70-g09d2