• 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!

Low Priority Various problems in error.log

Night starts, eh? That certainly explains why it happened mainly for Barbossa as I deliberately set him up for night time.

Was Jean Lafitte historically a smuggler? How would that work worth his American loyalties?
You could also make a brand new character who is a smuggler.
Jean Lafitte is one of the most famouse smugglers there is :p. He sort of founder New Orleans as a smugglers town and had a fleet to protect it etc. He was even asked by some governors to send some ships to aid them :p.

My fixes now inlcuded in here:

http://www.piratesahoy.net/threads/levis-stuff-v-5-1.25316/
 
Last edited:
Crew seems to refer to this:
Code:
ref crew = characterFromID("Treas_Crewmember_" + MAX_CREWMEMBERS);

So I have no idea where this is comming from. anyone can tell me what this is doing?
I think it is trying to find the last member of the crew (and setting variable crew accordingly) so that in the rest of the random_sailors_sit... code it can use this as shorthand to replace them with the NPC .

CharacterUtilite sets up 10 of these Treas_Crewmember_XX characters when you leave service of a nation. However each only quotes model and head type. I don't know enough to ascertain if that is how the missing ani arises but the replacement NPC overwrites the ani of crew (of course the other 9 may be missing the attribute too in that case).
 
CharacterUtilite sets up 10 of these Treas_Crewmember_XX characters when you leave service of a nation. However each only quotes model and head type. I don't know enough to ascertain if that is how the missing ani arises but the replacement NPC overwrites the ani of crew (of course the other 9 may be missing the attribute too in that case).
These characters are pre-defined in PROGRAM\Characters\init\Treas[something].c (can't remember by the top of my head).
Actually, I'm not sure if that is the best way to handle that whole feature, but that is how it works.
What is the value of MAX_CREWMEMBERS? Perhaps the last one isn't actually defined because it was written assuming a < loop instead of a <= loop?
 
This change in seadogs.c should prevent a potential error.log entry:
Code:
      case "ChrFightMode":
         if(bSeaActive && !bAbordageStarted) break; // PB: Don't do this while sailing, but don't prevent it during boarding
         if(CheckAttribute( &Locations[FindLocation(GetAttribute(Pchar, "location"))],"noFight" ))
 
Code:
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 90
invalid index 3 [size:3]
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 90
function 'CreateFlagEnvironment' stack error
I think I saw that before too, but when I tried to replicate it for testing, I couldn't.
It really isn't supposed to be happening though. :modding
As @pedrwyth is looking into flags again, I ended up browsing through the DLLs in the MODULES folder again as well.
I noticed a few things:
1. I think fortflag.dll isn't used anywhere. I'm going to remove it and see what happens....
2. I didn't have shipflag1.dll at all? Uh??? Do you guys not have that file either? I have now recreated it so it won't be missing next time. o_O
3. It looks like there was a number wrong in pirpennant3.dll which I am thinking (HOPING!) might have been responsible for the error I quoted above.

On the tiny chance that I am not wrong here, could this possibly have fixed that long-standing and elusive issue?
Might that even do something against those most-likely-flag-related "Graphical Anomalies" that we have been having for many, many years now?
I wouldn't count on any of that.... But we can always hope, no.....? :ninja

See attached for my attempts at restored and corrected files.
 

Attachments

  • pirpennant3.zip
    169.8 KB · Views: 194
I've got to admit that this particular error message on start new game is quite obnoxious:
Code:
RUNTIME ERROR - file: ITEMS\itemLogic.c; line: 1556
missed attribute: corpseidx
RUNTIME ERROR - file: ITEMS\itemLogic.c; line: 1556
no rAP data
It probably doesn't do much harm, but WHY is it happening in the first place?
There is nothing related to corpses at that point, because the game has hardly started yet. :facepalm

Here's the relevant section:
Code:
  if(FindLocation(chr.location)!=-1 && !sti(Interfacestates.Launched))//MAXIMUS: open corpse-box -->
   {
     int tmpi = sti(locations[FindLocation(chr.location)].locators.box.(atrName).corpseIdx); // <----------- THAT LINE ----------
     aref rootLocs; makearef(rootLocs, locations[FindLocation(chr.location)].locators);
     if(tmpi<0)
 
I've got to admit that this particular error message on start new game is quite obnoxious:
Code:
RUNTIME ERROR - file: ITEMS\itemLogic.c; line: 1556
missed attribute: corpseidx
RUNTIME ERROR - file: ITEMS\itemLogic.c; line: 1556
no rAP data
It probably doesn't do much harm, but WHY is it happening in the first place?
There is nothing related to corpses at that point, because the game has hardly started yet. :facepalm

Here's the relevant section:
Code:
  if(FindLocation(chr.location)!=-1 && !sti(Interfacestates.Launched))//MAXIMUS: open corpse-box -->
   {
     int tmpi = sti(locations[FindLocation(chr.location)].locators.box.(atrName).corpseIdx); // <----------- THAT LINE ----------
     aref rootLocs; makearef(rootLocs, locations[FindLocation(chr.location)].locators);
     if(tmpi<0)

I never get this one, so on which storyline or character is this?
Could it be the items are initialized before the characters so chr.location doesn't exist yet?
It could also be an corpse is put there without the proper dieying code so it doesn't have the corpseIdx
Could you trace which character this is about?
 
At the moment I can't do anything because I must first finish the flags stuff. I'm aiming to get that something for that test-worthy before the end of the week.

chr.location can't be missing, because the error is on (atrName).corpseIdx instead.
 
In PROGRAM\Locations\locations_loader.c I changed this function to avoid error.log entries in some cases (specifically the savegame @Talisman just posted):
Code:
bool LocIsEntryLocation(ref Location)
{
   ref rPlayer = GetMainCharacter();
   if (CheckAttribute(rPlayer,"location.from_sea"))
   {
     //traceif("LocIsEntryLocation = " + rPlayer.location.from_sea);
     if (rPlayer.location.from_sea == Location.id) return true;
   }
   return false;

   // PB: Old code as per below; now rewritten to match with Character_LocIsEntryLocation above and avoid error logs
/*   if (!CheckAttribute(rPlayer, "location.from_sea"))   trace("ERROR: Missing attribute for location " + Location.id);
   if(rPlayer.location.from_sea != Location.id) return false;
   return true;*/
}
 
From compile.log:
Code:
Template <follow> -> path not found chr.id = Treas_Crewmember_1
WARNING!!! Item id =  not implemented
Template <follow> -> path not found chr.id = Treas_Crewmember_2
WARNING!!! Item id =  not implemented
Template <follow> -> path not found chr.id = Treas_Crewmember_3
WARNING!!! Item id =  not implemented
Template <follow> -> path not found chr.id = Treas_Crewmember_4
WARNING!!! Item id =  not implemented
Template <follow> -> path not found chr.id = Treas_Crewmember_5
WARNING!!! Item id =  not implemented
Template <follow> -> path not found chr.id = Treas_Crewmember_6
WARNING!!! Item id =  not implemented
Template <follow> -> path not found chr.id = Treas_Crewmember_7
WARNING!!! Item id =  not implemented
Template <follow> -> path not found chr.id = Treas_Crewmember_8
WARNING!!! Item id =  not implemented
Template <follow> -> path not found chr.id = Treas_Crewmember_9
WARNING!!! Item id =  not implemented
Template <follow> -> path not found chr.id = Treas_Crewmember_10
WARNING!!! Item id =  not implemented

Those crewmember ones make "sense" because they didn't fit in the location.
But those Item ID warnings are weird. What code is asking for empty items???
@lucho1392: Do you have any default functionality disabled? For example, did you switch off the Ammo Mod?
 
I noticed sometimes the shipyard will give an error about a missing type for a ship.
its not gamebreaking but might be usefull to check it someday.
Don't have an error log which has it now but will try to generate one soon. It seems to be in a specific (low tier) ship cause I only have it sometimes on a new game. So I think its just a matter of one ship missing a attribute or a loop going to far or something.
 
I noticed sometimes the shipyard will give an error about a missing type for a ship.
its not gamebreaking but might be usefull to check it someday.
Don't have an error log which has it now but will try to generate one soon. It seems to be in a specific (low tier) ship cause I only have it sometimes on a new game. So I think its just a matter of one ship missing a attribute or a loop going to far or something.
Need the exact entry to figure this one out. Looking forward to your confirmation. :doff
 
From an error.log by @Hylie Pistof:
Code:
RUNTIME ERROR - file: interface\transfer_crew.c; line: 235
Using reference variable without initializing
RUNTIME ERROR - file: interface\transfer_crew.c; line: 235
Using reference variable without initializing
RUNTIME ERROR - file: interface\transfer_crew.c; line: 235
Using reference variable without initializing
Should be double-checked.
 
Any idea when transfer_crew was last changed cause this sounds like a bracket missing. would be nice to know where the last changes happened. that could make it a lot easier :p.
 
Any idea when transfer_crew was last changed cause this sounds like a bracket missing. would be nice to know where the last changes happened. that could make it a lot easier :p.
Not sure; I don't have access to my game files until tonight, so I can't even see where the error occurs.

I know I modified some of the transfer functions this weekend, but not the crew one.
Unless it was for the general search-and-replace to change the skill-calling functions.
 
my files say its last changed on 28-07-13
So this must be something really old then :p?
its in this function:
Code:
void FillCharactersList(ref ViewingCharacter)
{
    int tempnum1;
    int tempnum2;
    int tempnum3;
    int tempnum4;
    int tempnum5;
    ref tempchar;
    string tempstring1;
    string tempstring2;
    string tempstring3;

    If (CheckAttribute(MainChar,"tempCharactersList"))
    {
        DeleteAttribute(MainChar,"tempCharactersList");
        if (TRACELOG == 1) { Trace("deleted existing list"); }
    }

    ListMax = 1;



    // ******* STEP 1/5: ADD MAIN CHARACTER *******

    MainChar.tempCharactersList.member1.idx = sti(MainChar.index);
    if (TRACELOG == 1) { Trace("added mainchar"); }
    ListMax++;



    // ******* STEP 3/5: ADD COMPANIONS AND THEIR OFFICERS *******

    for (tempnum1 = 1; tempnum1 < 4; tempnum1++)
    {
        tempnum2 = GetCompanionIndex(MainChar,tempnum1);
        if(tempnum2>=0 && IsTrader(&characters[tempnum2]) == true) continue;//MAXIMUS: such companion will not be added // KK
        if(CheckAttribute(newFriend,"index") && tempnum2==sti(newFriend.index)) continue;//MAXIMUS: companion will not be added  <----------------------------------THIS LINE
        if (tempnum2 >= 0)
        {
            tempstring1 = "member" + ListMax;
            MainChar.tempCharactersList.(tempstring1).idx = tempnum2;
            if (TRACELOG == 1) { Trace("added list member " + ListMax + ": idx " + tempnum2 + " type 2"); }
            ListMax++;

            tempchar = GetCharacter(tempnum2);
            for (tempnum3 = 1; tempnum3 < 4; tempnum3++)
            {
                tempnum4 = GetOfficersIndex(tempchar,tempnum3);
                if (TRACELOG == 1) { Trace("checking officer " + tempnum3 + ", idx " + tempnum4 + ", of companion " + tempnum1 + ", idx " + tempnum2); }
                if (tempnum4 >= 0)
                {
                    tempstring1 = "member" + ListMax;
                    MainChar.tempCharactersList.(tempstring1).idx = tempnum4;
                    if (TRACELOG == 1) { Trace("added list member " + ListMax + ": idx " + tempnum4 + " type 3"); }
                    ListMax++;
                }
            }
        }
    }

    ListMax--;
    if (TRACELOG == 1) { Trace("list total: " + ListMax); }
    curOfficer = 1;
    xi_refCharacter = GetMainCharacter();

    tempnum3 = sti(ViewingCharacter.index);
    for (tempnum1 = 1; tempnum1 <= ListMax; tempnum1++)
    {
        tempstring1 = "member" + tempnum1;
        tempnum2 = sti(MainChar.tempCharactersList.(tempstring1).idx);
        if (tempnum2 == tempnum3)
        {
            curOfficer = tempnum1;
            xi_refCharacter = GetCharacter(tempnum2);
        }
    }

    AddCharacterExp(xi_refCharacter,0);
}

The newFriend ref is made at the top of the document so its a globally define ref. It seems to have something todo with the companion.
Did you maybe change anything regarding the companion where this variable used to be used?
 
While newFriend should indeed be defined there, it doesn't get filled with anything until here:
Code:
// KK -->
   newFriend = &NullCharacter;
   if (nCompanionIndex == -1) {
     GameInterface.title = "titleAbordageCrew";
     crewTransfer = XI_ConvertString("Crew Capture");
   } else {
     newFriend = GetCharacter(nCompanionIndex);
     GameInterface.title = "titleTransferCrew";
     crewTransfer = XI_ConvertString("Crew Transfer");
   }
// <-- KK
Maybe that error occurs because nCompanionIndex is indeed -1 so newFriend is "&NullCharacter".
Then I assume the game doesn't like doing a CheckAttribute on that....

If that is indeed the case, this may help:
Code:
   for (tempnum1 = 1; tempnum1 < 4; tempnum1++)
   {
     tempnum2 = GetCompanionIndex(MainChar,tempnum1);
     if(tempnum2>=0 && IsTrader(&characters[tempnum2]) == true) continue;//MAXIMUS: such companion will not be added // KK
     if(nCompanionIndex == -1) continue; // PB: Hopefully prevent an error on the next line
     if(CheckAttribute(newFriend,"index") && tempnum2==sti(newFriend.index)) continue;//MAXIMUS: companion will not be added
 
With 24th Oct Version & SmugglingEscape .zip from Here :- Needs Testing - Coastguard Ships Remain After Escape | PiratesAhoy!

Using Free Play with occupation Smuggler

Game is going smoothly so far - ( am playing arcade mode) -- have done one "safe Zone" Smuggling and am about to do an "unsafe Zone" one.

I have just noticed this error. log referring to leveling.c

Code:
RUNTIME ERROR - file: Leveling.c; line: 917
missed attribute: rank
RUNTIME ERROR - file: Leveling.c; line: 917
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 917
missed attribute: experience
RUNTIME ERROR - file: Leveling.c; line: 917
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 176
missed attribute: rank
RUNTIME ERROR - file: Leveling.c; line: 176
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 917
missed attribute: rank
RUNTIME ERROR - file: Leveling.c; line: 917
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 176
missed attribute: rank
RUNTIME ERROR - file: Leveling.c; line: 176
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 917
missed attribute: rank
RUNTIME ERROR - file: Leveling.c; line: 917
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 176
missed attribute: rank
RUNTIME ERROR - file: Leveling.c; line: 176
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 917
missed attribute: rank
RUNTIME ERROR - file: Leveling.c; line: 917
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 176
missed attribute: rank
RUNTIME ERROR - file: Leveling.c; line: 176
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 917
missed attribute: rank
RUNTIME ERROR - file: Leveling.c; line: 917
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 917
missed attribute: experience
RUNTIME ERROR - file: Leveling.c; line: 917
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 176
missed attribute: rank
RUNTIME ERROR - file: Leveling.c; line: 176
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 917
missed attribute: rank
RUNTIME ERROR - file: Leveling.c; line: 917
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 176
missed attribute: rank
RUNTIME ERROR - file: Leveling.c; line: 176
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 917
missed attribute: rank
RUNTIME ERROR - file: Leveling.c; line: 917
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 176
missed attribute: rank
RUNTIME ERROR - file: Leveling.c; line: 176
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 917
missed attribute: rank
RUNTIME ERROR - file: Leveling.c; line: 917
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 176
missed attribute: rank
RUNTIME ERROR - file: Leveling.c; line: 176
no rAP data
RUNTIME ERROR - file: seadogs.c; line: 725
Save - ARef to non existing attributes branch

am posting the system & compile as well plus a save from just before the error log was generated.

All I did after the save was - walk to the store & sell some rum and inventory items - bought 60 cinnamon ( for later smuggling)

Then went to tavern - Ambros Biceneros - offered me Hard Labour of an Assassin Quest - Accepted this - spent night in tavern room - talked to Smugglers Agent - didn't talk to Soldiers - talked to smugglers Agent again.

That is as far as I got when I noticed the error log.


:drunk
 

Attachments

  • error.log
    2.3 KB · Views: 217
  • compile.log
    52.9 KB · Views: 210
  • system.log
    28.2 KB · Views: 202
  • -=Player=- La Grenade.7z
    481.4 KB · Views: 196
Got these ones on @Hylie Pistof's savegame from here: Unconfirmed Bug - Locator problem at Cape Francos | PiratesAhoy!
Code:
RUNTIME ERROR - file: Leveling.c; line: 917
missed attribute: rank
RUNTIME ERROR - file: Leveling.c; line: 917
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 917
missed attribute: experience
RUNTIME ERROR - file: Leveling.c; line: 917
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 176
missed attribute: rank

Probably occurred when I was fighting random Indians around that temple area with my officers.
 
Last edited:
^ Updated the above post to actually include the entries I meant to add. :facepalm
 
Back
Top