--- a/hedgewars/uTeams.pas Mon Feb 16 22:33:15 2015 +0300
+++ b/hedgewars/uTeams.pas Thu Apr 02 21:09:56 2015 +0300
@@ -549,10 +549,12 @@
Gear: PGear;
begin
s:= '';
-if (not isDeveloperMode) or (CurrentTeam = nil) then
+if (not isDeveloperMode) then
exit;
+TryDo((CurrentTeam <> nil), 'Can''t add hedgehogs yet, add a team first!', true);
with CurrentTeam^ do
begin
+ TryDo(HedgehogsNumber<=cMaxHHIndex, 'Can''t add hedgehog to "' + TeamName + '"! (already ' + intToStr(HedgehogsNumber) + ' hogs)', true);
SplitBySpace(id, s);
SwitchCurrentHedgehog(@Hedgehogs[HedgehogsNumber]);
CurrentHedgehog^.BotLevel:= StrToInt(id);