<!--quoteo(post=331575:date=Jun 21 2009, 09:09 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Jun 21 2009, 09:09 PM) <a href="index.php?act=findpost&pid=331575"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I still had the Hornblower crash and thought maybe it was caused by the following line:
<i>setCharacterShipLocation(characterFromID("Sir Peter Parker"), "Antigua_port");</i>
Reason being, maybe that messed up the number of ships in port?
However, it turned out that was not the case and the problem lied with the "BritishWarship" code instead.
The code said:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> refShip.Flags.Mast2.Flag1 = FLAG_ENSIGN;
refShip.Flags.Mast3.Flag1 = FLAG_ENSIGN;
refShip.Flags.Mast4.Flag1 = FLAG_ENSIGN;
refShip.Flags.NoPennants = true;<!--c2--></div><!--ec2-->
But should've been:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> refShip.Flags.Mast0.Flag1 = FLAG_ENSIGN;
refShip.Flags.Mast2.Flag1 = FLAG_ENSIGN;
refShip.Flags.Mast3.Flag1 = FLAG_ENSIGN;
refShip.Flags.Mast4.Flag1 = FLAG_ENSIGN;
refShip.Flags.NoPennants = true;<!--c2--></div><!--ec2-->
Note the missing <i>Mast0</i> part for the flag added into the hull itself.
I'm thinking that this same problem might be the reason for the seemingly random crashes that are still left with this mod.
After all, the ships selected in 3D sailing mode are random, so the loading of a ship with incorrect flag-code and subsequent crash would also be random.
This indicates that it is VERY important to make sure the code IS correct for the ship, otherwise <img src="style_emoticons/<#EMO_DIR#>/boom.gif" style="vertical-align:middle" emoid=":boom" border="0" alt="boom.gif" />
If so, it'd be a good idea for someone to go over the ships_init.c file and check it with all ships to make sure it's correct.
Using GM Viewer with "Show Labels" and "Show Locators" on, this isn't so hard. Make sure you also check the hulls!<!--QuoteEnd--></div><!--QuoteEEnd-->
I didn't have time to continue the work yesterday evening but i'm thinking that you must be right about those random crashes !
For now, i didn't see what part of code can cause those crashes
I will have more time to install patch 2 update this afternoon <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid="
" border="0" alt="me.gif" />
How many ships are in ships_init file ? <img src="style_emoticons/<#EMO_DIR#>/pirate-ayant-soif.gif" style="vertical-align:middle" emoid="
" border="0" alt="pirate-ayant-soif.gif" />
<img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid="
" border="0" alt="par-ty.gif" />