• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Fix in Progress Antigua Port Admiral gives out Swedish Letter of Marque

Sad to hear that. Up until today, I didn't have any issues.

Anyway, after a fresh reinstall of the mod and the lastest zip, the portadmiral still asks fior an "error letter of marque". Adding or removing the ch.nation to his character didn't make a difference.

Wait, maybe the zip wasn't the right one... I'll check tomorrow, got to go now.
Hum, even with just a fresh install of the base mod without any of the zip fixes, the portadmiral still asks fior an "error letter of marque". I'm dumbfounded.

The error log still reads
Code:
RUNTIME ERROR - file: nations\nations.c; line: 306
invalid index 9 [size:8]
RUNTIME ERROR - file: nations\nations.c; line: 306
function 'GetNationByType' stack error
RUNTIME ERROR - file: nations\nations.c; line: 319
Using reference variable without initializing
RUNTIME ERROR - file: nations\nations.c; line: 319
null ap
RUNTIME ERROR - file: nations\nations.c; line: 319
no rAP data
Call it a completely uneducated guess but I have a hunch the "function 'GetNationByType' stack error" may be the key.
 
Last edited:
There is certainly a problem in that something is calling 'GetNationByType', and line 306 is indeed part of that function:
Code:
return &Nations[iNationType];
The question is, what is calling 'GetNationByType' and giving it nation number 9, which in "globals.c" is NEUTRAL_NATION?

The next part of the log points at line 319, which is the return line of 'GetNationDescByType':
Code:
ref rNation = GetNationByType(iNationType);
return rNation.Desc;
// <--- This is line 319[/code]It's complaining about an improper reference variable, which makes sense as "rNation" is the reference variable in question and it hasn't been set because the line above, which is supposed to set it, is presumably what fed the number 9 to 'GetNationByType', which then failed to return anything useful.

So now the question becomes, what is calling 'GetNationDescByType' and feeding it an invalid nation number?

You're getting the admiral saying "error letter of marque". That comes from this line of "antigua_portadmiral.h":
Code:
"I am afraid that you can be of no possible service to me. If you truly wish to be of service then join the #snation_desc# navy, or at least obtain a #snation_desc# Letter of Marque."
He's probably also asking you to join the "error navy" as well, because the nationality of both navy and LoM is that preprocessed variable "nation_desc". And that is set in "antigua_portadmiral.c" in case "sorry" by this line:
Code:
Preprocessor_Add("nation_desc", GetNationDescByType(Npchar.nation));
So your game is still giving the admiral an invalid nation. That nation is fed to 'GetNationDescByType' by "antigua_portadmiral.c", and that triggers the error log.
 
It's not always nation 9 though. I've seen the error with numbers 10 and 11 aswell so it seems to be picking an invalid nation number pretty much at random.
 
Do you have the version of "PROGRAM\Characters\init\Antigua.c" which includes the 'ch.nation = ENGLAND;' lines for characters "Antigua_Portadmiral" and "Antigua_Regulating"?

Also, when you re-installed the base mod, did you start from an absolutely clean install - create new folder, install the game from CD's to that folder, then install the mod onto that? Or did you re-run the mod installer on your existing installation?
 
Do you have the version of "PROGRAM\Characters\init\Antigua.c" which includes the 'ch.nation = ENGLAND;' lines for characters "Antigua_Portadmiral" and "Antigua_Regulating"?
Not for that last try. Now that I have added it, he says Portuguese, reinforcing my theory that it's picking nations at random for whatever reason. And when asked again immediately goes back to saying error.

Also, when you re-installed the base mod, did you start from an absolutely clean install - create new folder, install the game from CD's to that folder, then install the mod onto that? Or did you re-run the mod installer on your existing installation?
Didn't install the game from the CD because I always keep a backup of the unmodded stock game, but I installed the mod onto that. Should the folder where I do it be empty save for the game folder and the mod files?
EDIT: Using an empty folder didn't change anything
 
Last edited:
Didn't install the game from the CD because I always keep a backup of the unmodded stock game, but I installed the mod onto that.
That should be fine. I do the same thing. :yes

Should the folder where I do it be empty save for the game folder and the mod files?
With the Beta 4 installer, it should no longer matter.
If you want to be safe, keep the Installer EXE and Main Archive outside your main game folder.
 
Back
Top