Thanks CCC, i really do try to help <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid="
" border="0" alt="smile.gif" /> BTW, nice work on the Realistic Shiprepairtime <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/onya.gif" style="vertical-align:middle" emoid="
" border="0" alt="onya.gif" />
Bug (and fix): Shipyard.c
Sometimes when you repair your ships you may lose your crew (esp. if you have `3-4` ships), and you may end up having 0 men on some of your ships. Problem: just a missing + sign. Find this in your Shipyard.c:
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->{
if(GetTownCrewQuantity(sTownName) >= mcrew - GetCrewQuantity(chref))
{
SetTownCrewQuantity(sTownName, GetTownCrewQuantity(sTownName) - (mcrew - GetCrewQuantity(chref)));
chref.Ship.Crew.Quantity = mcrew;
}
else
{
chref.Ship.Crew.Quantity = GetTownCrewQuantity(sTownName);
SetTownCrewQuantity(sTownName, 0);
}
}<!--QuoteEnd--></div><!--QuoteEEnd-->
And replace this line
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->chref.Ship.Crew.Quantity = GetTownCrewQuantity(sTownName);<!--QuoteEnd--></div><!--QuoteEEnd-->
with this:
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->chref.Ship.Crew.Quantity += GetTownCrewQuantity(sTownName);<!--QuoteEnd--></div><!--QuoteEEnd-->
See, the first part checks if the town has more crew than yyou need to max your ship, if so, the crew is added and town crew decreases by that amount. Second part, if there`s not enough crew to max out your ships crew, it *should* just add all the town crew to your crew. But without the <b>+</b>, it just sets your crew equal to the town crew. Just put the + before the equals sign, with no space betwen +=.
Cheers <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/onya.gif" style="vertical-align:middle" emoid="
" border="0" alt="onya.gif" />