1. Dismiss Notice
  2. GOG.com logo

    Thanks to YOUR votes, GOG.com now sells:
    - Sea Dogs - Sea Dogs: Caribbean Tales
    - Sea Dogs: City of Abandoned Ships

    Vote now to add Pirates of the Caribbean to the list!

    Dismiss Notice
  3. Under the Crossbones Podcast

    A Pirate Podcast with Interviews
    Music, Comedy and all things Pirate!

    - Episode Guide - About - Subscribe -
    - Twitter - Facebook - iTunes - Android -
    - Youtube - Fill the Coffers -

    Dismiss Notice
  4. New Horizons logo

    Quick links for PotC: New Horizons
    - Download latest version
    - Wiki - FAQ - Report bugs here
    - ModDB profile

  5. GOF logo

    Quick links for AoP2: Gentlemen of Fortune 2
    - Downloads and info
    - Historical Immersion Supermod
    - ModDB Profile

Dismiss Notice
New to the forum?
Please take a moment to read our Welcome Message and Forum Rules.

Solved Ship Names Limited by Class and Type

Discussion in 'Sea Dogs: Caribbean Tales' started by Modder01, Sep 8, 2017.

  1. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    214
    Ah, I see the 2nd function...I only did the first one. Let's change yours slightly to assign iNation, since it's passed as a parm and not use the sti within the switch:

    Code:
    void SetRandomNameToShip(ref rCharacter)
    {
        ref rMassiveOfNames;
    
        int st = -1;
        bool isMerchant = false;
        bool isWar = false;
        int nClass = 7;
    
       if(CheckAttribute(rCharacter,"ship.type"))
            st = sti(rCharacter.ship.type);
    
       if(st >= 0 && st < SHIP_TYPES_QUANTITY_WITH_FORT) {
           ref rShip = &RealShips[st];
           if(CheckAttribute(rShip, "type.merchant" && sti(rShip.type.merchant)==true)) {
                isMerchant = true;
           }
           else  {
                if(CheckAttribute(rShip, "type.war" && sti(rShip.type.war)==true))
                isWar = true;
           }
           if(CheckAttribute(rShip, "Class"))
                nClass = sti(rShip.Class);
       }
    
        if(!CheckAttribute(rCharacter, "nation"))
        {
            rCharacter.nation = PIRATE;
        }
        if(sti(rCharacter.nation) == -1)
        {
            rCharacter.nation = PIRATE;
        }
    
        switch (sti(rCharacter.nation))
        {
            case ENGLAND:
                if(isMerchant==true && isWar==true){
                    makeref(rMassiveOfNames, sRndShpEnHybName);
                }else {
                    if(isMerchant==true){
                        makeref(rMassiveOfNames, sRndShpEnTraName);
                    }
                    else {
                        if(nClass <= 6 && nClass >= 3) {
                            makeref(rMassiveOfNames, sRndShpEnSmWarName);
                        } else {
                            makeref(rMassiveOfNames, sRndShpEnLgWarName);
                        }
                    }
                }
            break;
            case FRANCE:
                makeref(rMassiveOfNames, sRndShpFrName);
            break;
            case SPAIN:
                makeref(rMassiveOfNames, sRndShpSpName);
            break;
            case PIRATE:
                makeref(rMassiveOfNames, sRndShpPiName);
            break;
            case HOLLAND:
                makeref(rMassiveOfNames, sRndShpHoName);
            break;
            case SMUGGLER:
                makeref(rMassiveOfNames, sRndShpPiName);
            break;
        }
        int iMassiveOfNamesSize = GetArraySize(rMassiveOfNames);
        rCharacter.Ship.Name = GetRandSubString(rMassiveOfNames[rand(iMassiveOfNamesSize-2)]);
    }
    
    string generateRandomNameToShip(int iNation, ref rCharacter)
    {
        ref rMassiveOfNames;
    
        int st = -1;
        bool isMerchant = false;
        bool isWar = false;
        int nClass = 7;
    
        if(CheckAttribute(rCharacter,"ship.type"))
            st = sti(rCharacter.ship.type);
    
        if(st >= 0 && st < SHIP_TYPES_QUANTITY_WITH_FORT) {
            ref rShip = &RealShips[st];
            if(CheckAttribute(rShip, "type.merchant" && sti(rShip.type.merchant)==true)) {
                isMerchant = true;
            }
            else  {
                if(CheckAttribute(rShip, "type.war" && sti(rShip.type.war)==true))
                isWar = true;
            }
            if(CheckAttribute(rShip, "Class"))
                nClass = sti(rShip.Class);
        }
    
        if(!CheckAttribute(rCharacter, "nation"))
        {
            iNation = PIRATE;
        }
        if(sti(rCharacter.nation) == -1)
        {
            iNation = PIRATE;
        }
    
        switch (iNation)
        {
            case ENGLAND:
                if(isMerchant==true && isWar==true){
                    makeref(rMassiveOfNames, sRndShpEnHybName);
                }else {
                    if(isMerchant==true){
                        makeref(rMassiveOfNames, sRndShpEnTraName);
                    }
                    else {
                        if(nClass <= 6 && nClass >= 3) {
                            makeref(rMassiveOfNames, sRndShpEnSmWarName);
                        } else {
                            makeref(rMassiveOfNames, sRndShpEnLgWarName);
                        }
                    }
                }
            break;
            case FRANCE:
                makeref(rMassiveOfNames, sRndShpFrName);
            break;
            case SPAIN:
                makeref(rMassiveOfNames, sRndShpSpName);
            break;
            case PIRATE:
                makeref(rMassiveOfNames, sRndShpPiName);
            break;
            case HOLLAND:
                makeref(rMassiveOfNames, sRndShpHoName);
            break;
            case SMUGGLER:
                makeref(rMassiveOfNames, sRndShpPiName);
            break;
        }
        int iMassiveOfNamesSize = GetArraySize(rMassiveOfNames);
        string sName = GetRandSubString(rMassiveOfNames[rand(iMassiveOfNamesSize-2)]);
    
        return sName;
    }
     
  2. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    214
    At this point, what you see above is now running in a game I just launched right now and I don't have the error described.
     
  3. Modder01

    Modder01 Freebooter Storm Modder

    Joined:
    Feb 1, 2014
    Messages:
    294
    Gender:
    Male
    Location:
    Oxford, Michigan, USA
    You're right, it runs, but there is a fair bit of runtime errors. When I look at the ships in the spyglass at least the english fort is not showing as another (dutch) ship anymore, but the english ships are still blank for their name... here is the error log again:
    Code:
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    missed attribute: fastreload
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    no rAP data
    
     
  4. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    214
    Those are errors from GetRandSubString, called at the end of those functions and you will need to debug the values being passed to it:

    iMassiveOfNamesSize and the rMassiveOfNames array that you were setting in your changes for England

    int iMassiveOfNamesSize = GetArraySize(rMassiveOfNames);
    rCharacter.Ship.Name = GetRandSubString(rMassiveOfNames[rand(iMassiveOfNamesSize-2)]);

    Debug those sRndShpEnSmWarName, sRndShpEnTraName, sRndShpEnHybName values. Make trace statements at various places to make sure you are getting values during their construction, when you assign them, the value of iMassiveOfNamesSize before you call GetRandSubString, etc.
     
  5. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    214
    You know, I was thinking if you are loading a saved game, I bet those new string arrays you set up for England are blank. I bet they only get created during a new game start. If you are using a saved game, you might try calling InitRandomShipsNames(); at the beginning of both those functions to see if that is the cause of your errors...that those new string arrays are blank having never been initialized in your old save since you have newly introduced them and that function is only called for a new game.
     
  6. Modder01

    Modder01 Freebooter Storm Modder

    Joined:
    Feb 1, 2014
    Messages:
    294
    Gender:
    Male
    Location:
    Oxford, Michigan, USA
    I use a new game every time I change the program code. it has become a habit of mine...
     
  7. Modder01

    Modder01 Freebooter Storm Modder

    Joined:
    Feb 1, 2014
    Messages:
    294
    Gender:
    Male
    Location:
    Oxford, Michigan, USA
    The following traces have been added:
    Code:
    case ENGLAND:
               trace(isMerchant);
               trace(isWar);
                if(isMerchant==true && isWar==true){
                    makeref(rMassiveOfNames, sRndShpEnHybName);
                }else {
                    if(isMerchant==true){
                        makeref(rMassiveOfNames, sRndShpEnTraName);
                    }
                    else {
                       trace(nClass);
                        if(nClass <= 6 && nClass >= 3) {
                            makeref(rMassiveOfNames, sRndShpEnSmWarName);
                        } else {
                            makeref(rMassiveOfNames, sRndShpEnLgWarName);
                        }
                    }
                }
    
    Here are the results in compile log:
    Code:
    ExternControlsInit
    Init encounters complete.
    Init weathers complete. 35 weathers found.
    PauseAllSounds
    ResetSoundScheme
    proc_break_video()
    PauseAllSounds
    ResetSoundScheme
    proc_break_video()
    PauseAllSounds
    ResetSoundScheme
    proc_break_video()
    PauseAllSounds
    ResetSoundScheme
    proc_break_video()
    PauseAllSounds
    ResetSoundScheme
    proc_break_video()
    ExternControlsInit
    DeckCamera_Turn_V
    Number of locations: 274
    bool CreateParticleEntity()
    
    characters quantity is 246
    
    ERROR! Cargo space overup (character=1500,Quantity=100)
    
    ResetSoundScheme
    SetSoundScheme: mainmenu_day_rain
    SETTING MUSIC: Music_main_theme
    ResetSoundScheme
    Find files : 0
    Number of locations: 274
    bool CreateParticleEntity()
    
    characters quantity is 246
    
    Character Ship have no HP value
    0
    0
    1
    Character Ship have no HP value
    Character Ship have no HP value
    Fort Renamed!
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    0
    0
    1
    Character Ship have no HP value
    0
    0
    1
    Character Ship have no HP value
    Character Ship have no HP value
    0
    0
    1
    Character Ship have no HP value
    0
    0
    1
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    0
    0
    1
    Character Ship have no HP value
    0
    0
    1
    Character Ship have no HP value
    0
    0
    1
    Character Ship have no HP value
    0
    0
    1
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    0
    0
    7
    Character Ship have no HP value
    0
    0
    7
    Character Ship have no HP value
    Character Ship have no HP value
    0
    0
    7
    Character Ship have no HP value
    0
    0
    7
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    0
    0
    7
    Character Ship have no HP value
    0
    0
    7
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    0
    0
    7
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    0
    0
    7
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    !!! Reload to 15
    LoadLocation(ref loc) Bridgetown_town
    PauseAllSounds
    PauseAllSounds
    ResetSoundScheme
    ResetSoundScheme
    SetSoundScheme: town_day
    SETTING MUSIC: music_eng_town
    Create 3D Sound <seashore> for locator <seashore01> into pos:(1.34652,0,38.3628)
    Create 3D Sound <fountain> for locator <fountain01> into pos:(-4.24645e-005,6.49856,-22.9992)
    Create 3D Sound <tavern> for locator <tavern01> into pos:(-13.1989,5.37277,2.02413)
    Create 3D Sound <shipyard> for locator <shipyard01> into pos:(-18.4345,3.24813,16.8705)
    Create 3D Sound <church> for locator <church01> into pos:(-24.1764,9.98409,-39.2192)
    ResumeAllSounds
    Quest ADDED
    *** blaze map given
    locator_name = reload1_back lockedReloadLocator =
    reload_cur_island_index = -1
    reload_cur_location_index = 15
    reload_island_index = 0
    reload_location_index = -1
    Start reload
    ResetSoundScheme
    PauseAllSounds
    ReloadStartFade
    UnloadLocation(aref loc) Bridgetown_town
    ReloadEndFade
    Load from location to sea sLoc = l1, x = -1246.32,z = -1379.55
    Fort Login rCharacter.Ship.Type is 7
    Character Ship have no HP value
    0
    0
    7
    sLocatorGroup is IslandShips1 sLocator is Ship_2
    Character Ship have no HP value
    0
    0
    7
    sLocatorGroup is IslandShips1 sLocator is Ship_3
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_day
    ResumeAllSounds
    
    Runtime errors remain the same...
     
  8. Modder01

    Modder01 Freebooter Storm Modder

    Joined:
    Feb 1, 2014
    Messages:
    294
    Gender:
    Male
    Location:
    Oxford, Michigan, USA
    New Traces:
    Code:
    void SetRandomNameToShip(ref rCharacter)
    {
        ref rMassiveOfNames;
    
        int st = -1;
        bool isMerchant = false;
        bool isWar = false;
        int nClass = 7;
    
       if(CheckAttribute(rCharacter,"ship.type")){
          trace("attribute '.ship.type' CHECKED!");
            st = sti(rCharacter.ship.type);
       }
    
       if(st >= 0 && st < SHIP_TYPES_QUANTITY_WITH_FORT) {
          trace("Selected ship is not a Fort or unused ship");
           ref rShip = &RealShips[st];
           if(CheckAttribute(rShip, "type.merchant" && sti(rShip.type.merchant)==true)) {
              trace("Selected ship is a merchant!");
                isMerchant = true;
           }
           else  {
                if(CheckAttribute(rShip, "type.war" && sti(rShip.type.war)==true))
               trace("Selected ship is a Warship!");
                isWar = true;
           }
           if(CheckAttribute(rShip, "Class")){
              trace(nClass);
                nClass = sti(rShip.Class);
          }
       }
    
        if(!CheckAttribute(rCharacter, "nation"))
        {
            rCharacter.nation = PIRATE;
        }
        if(sti(rCharacter.nation) == -1)
        {
            rCharacter.nation = PIRATE;
        }
    
        switch (sti(rCharacter.nation))
        {
            case ENGLAND:
               trace(isMerchant);
               trace(isWar);
                if(isMerchant==true && isWar==true){
                    makeref(rMassiveOfNames, sRndShpEnHybName);
                }else {
                    if(isMerchant==true){
                       trace("Merchant names successful!");
                        makeref(rMassiveOfNames, sRndShpEnTraName);
                    }
                    else {
                       trace(nClass);
                        if(nClass <= 6 && nClass >= 3) {
                           trace("Small Warship names successful!");
                            makeref(rMassiveOfNames, sRndShpEnSmWarName);
                        } else {
                           trace("Large Warship names successful!");
                            makeref(rMassiveOfNames, sRndShpEnLgWarName);
                        }
                    }
                }
            break;
            case FRANCE:
                makeref(rMassiveOfNames, sRndShpFrName);
            break;
            case SPAIN:
                makeref(rMassiveOfNames, sRndShpSpName);
            break;
            case PIRATE:
                makeref(rMassiveOfNames, sRndShpPiName);
            break;
            case HOLLAND:
                makeref(rMassiveOfNames, sRndShpHoName);
            break;
            case SMUGGLER:
                makeref(rMassiveOfNames, sRndShpPiName);
            break;
        }
        int iMassiveOfNamesSize = GetArraySize(rMassiveOfNames);
        rCharacter.Ship.Name = GetRandSubString(rMassiveOfNames[rand(iMassiveOfNamesSize-2)]);
    }
    
    string generateRandomNameToShip(int iNation, ref rCharacter)
    {
        ref rMassiveOfNames;
    
        int st = -1;
        bool isMerchant = false;
        bool isWar = false;
        int nClass = 7;
    
        if(CheckAttribute(rCharacter,"ship.type")){
           st = sti(rCharacter.ship.type);
           trace("attribute '.ship.type' CHECKED!");
       }
           
    
        if(st >= 0 && st < SHIP_TYPES_QUANTITY_WITH_FORT) {
           trace("Selected ship is not a Fort or unused ship");
            ref rShip = &RealShips[st];
            if(CheckAttribute(rShip, "type.merchant" && sti(rShip.type.merchant)==true)) {
               trace("Selected ship is a merchant!");
                isMerchant = true;
            }
            else  {
                if(CheckAttribute(rShip, "type.war" && sti(rShip.type.war)==true))
               trace("Selected ship is a Warship!");
                isWar = true;
            }
            if(CheckAttribute(rShip, "Class")) {
               nClass = sti(rShip.Class);
               trace(nClass);
           }
        }
    
        if(!CheckAttribute(rCharacter, "nation"))
        {
            iNation = PIRATE;
        }
        if(sti(rCharacter.nation) == -1)
        {
            iNation = PIRATE;
        }
    
        switch (iNation)
        {
            case ENGLAND:
               trace(isMerchant);
               trace(isWar);
                if(isMerchant==true && isWar==true){
                    makeref(rMassiveOfNames, sRndShpEnHybName);
                }else {
                    if(isMerchant==true){
                       trace("Merchant names successful!");
                        makeref(rMassiveOfNames, sRndShpEnTraName);
                    }
                    else {
                       trace(nClass);
                        if(nClass <= 6 && nClass >= 3) {
                           trace("Small Warship names successful!");
                            makeref(rMassiveOfNames, sRndShpEnSmWarName);
                        } else {
                           trace("Large Warship names successful!");
                            makeref(rMassiveOfNames, sRndShpEnLgWarName);
                        }
                    }
                }
            break;
            case FRANCE:
                makeref(rMassiveOfNames, sRndShpFrName);
            break;
            case SPAIN:
                makeref(rMassiveOfNames, sRndShpSpName);
            break;
            case PIRATE:
                makeref(rMassiveOfNames, sRndShpPiName);
            break;
            case HOLLAND:
                makeref(rMassiveOfNames, sRndShpHoName);
            break;
            case SMUGGLER:
                makeref(rMassiveOfNames, sRndShpPiName);
            break;
        }
        int iMassiveOfNamesSize = GetArraySize(rMassiveOfNames);
        string sName = GetRandSubString(rMassiveOfNames[rand(iMassiveOfNamesSize-2)]);
       
       trace(sName);
        return sName;
    }
    
    New Compile Log for results:
    Code:
    ExternControlsInit
    Init encounters complete.
    Init weathers complete. 35 weathers found.
    PauseAllSounds
    ResetSoundScheme
    proc_break_video()
    PauseAllSounds
    ResetSoundScheme
    proc_break_video()
    PauseAllSounds
    ResetSoundScheme
    proc_break_video()
    PauseAllSounds
    ResetSoundScheme
    proc_break_video()
    PauseAllSounds
    ResetSoundScheme
    proc_break_video()
    ExternControlsInit
    DeckCamera_Turn_V
    Number of locations: 274
    bool CreateParticleEntity()
    
    characters quantity is 246
    
    ERROR! Cargo space overup (character=1500,Quantity=100)
    
    string added to ship/fort
    ResetSoundScheme
    SetSoundScheme: mainmenu_day
    SETTING MUSIC: Music_main_theme
    ResetSoundScheme
    Find files : 0
    Number of locations: 274
    bool CreateParticleEntity()
    
    characters quantity is 246
    
    ERROR! Cargo space overup (character=1500,Quantity=100)
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    0
    1
    1
    Large Warship names successful!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Fort Renamed!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    0
    1
    1
    Large Warship names successful!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    0
    1
    1
    Large Warship names successful!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    0
    1
    1
    Large Warship names successful!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    0
    1
    1
    Large Warship names successful!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    0
    1
    1
    Large Warship names successful!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    0
    1
    1
    Large Warship names successful!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    0
    1
    1
    Large Warship names successful!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    0
    1
    1
    Large Warship names successful!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Selected ship is not a Fort or unused ship
    7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    0
    0
    7
    Large Warship names successful!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    0
    0
    7
    Large Warship names successful!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    0
    0
    7
    Large Warship names successful!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    0
    0
    7
    Large Warship names successful!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    0
    0
    7
    Large Warship names successful!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    0
    0
    7
    Large Warship names successful!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    !!! Reload to 15
    LoadLocation(ref loc) Bridgetown_town
    Generate Passenger Quest Begin
    PauseAllSounds
    PauseAllSounds
    ResetSoundScheme
    ResetSoundScheme
    SetSoundScheme: town_day
    SETTING MUSIC: music_eng_town
    Create 3D Sound <seashore> for locator <seashore01> into pos:(1.34652,0,38.3628)
    Create 3D Sound <fountain> for locator <fountain01> into pos:(-4.24645e-005,6.49856,-22.9992)
    Create 3D Sound <tavern> for locator <tavern01> into pos:(-13.1989,5.37277,2.02413)
    Create 3D Sound <shipyard> for locator <shipyard01> into pos:(-18.4345,3.24813,16.8705)
    Create 3D Sound <church> for locator <church01> into pos:(-24.1764,9.98409,-39.2192)
    ResumeAllSounds
    Quest ADDED
    *** blaze map given
    locator_name = reload1_back lockedReloadLocator =
    reload_cur_island_index = -1
    reload_cur_location_index = 15
    reload_island_index = 0
    reload_location_index = -1
    Start reload
    ResetSoundScheme
    PauseAllSounds
    ReloadStartFade
    UnloadLocation(aref loc) Bridgetown_town
    ReloadEndFade
    Load from location to sea sLoc = l1, x = -1246.32,z = -1379.55
    Fort Login rCharacter.Ship.Type is 7
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    0
    0
    7
    Large Warship names successful!
    sLocatorGroup is IslandShips1 sLocator is Ship_5
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    0
    0
    7
    Large Warship names successful!
    sLocatorGroup is IslandShips1 sLocator is Ship_3
    Character Ship have no HP value
    attribute '.ship.type' CHECKED!
    0
    0
    7
    Large Warship names successful!
    sLocatorGroup is IslandShips1 sLocator is Ship_1
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_day
    ResumeAllSounds
    
     
  9. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    214
    Going back to the errors:

    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument

    These both reside in function: GetRandSubString(string sStr)

    Line 19
    int iFindPos = findSubStr(&sStr, ",", 0);
    Line 35
    iFindPos = findSubStr(&sStr, ",", iFindPos + 1);

    Both errors indicate an invalid string argument, notably sStr, which is the passed argument. From your original call:
    GetRandSubString(rMassiveOfNames[rand(iMassiveOfNamesSize-2)]);

    The string being passed, is one of the array elements of rMassiveOfNames, which from the case statements, is a reference to either: sRndShpEnHybName, sRndShpEnTraName, sRndShpEnSmWarName, or sRndShpEnLgWarName. Where are you setting those array string values? That is one place you need to look, because simply declaring them, like at the top of Ships.c, does not initialize the elements/set them to a value, so they might be empty values. Check InitRandomShipsNames() to make sure each one of them is getting values set, and put trace statements there to make sure it executes and produces the results for each of those strings. Also trace iMassiveOfNamesSize value and rMassiveOfNames[0] (the first element) to be sure they contain something valid.
     
  10. Modder01

    Modder01 Freebooter Storm Modder

    Joined:
    Feb 1, 2014
    Messages:
    294
    Gender:
    Male
    Location:
    Oxford, Michigan, USA
    The string is assigned in ships_name.c but the function call for it's parent ("InitRandomShipsNames()") is using the extern prefix on the top of the ships.c file in the method "extern void".
    This is the testing values for England:
    Code:
    n = 0;
    n = AddStr2Array(&sRndShpEnTraName, n, "Trader, Trader,");
    n = AddStr2Array(&sRndShpEnHybName, n, "Hybrid, Hybrid,");
    n = AddStr2Array(&sRndShpEnSmWarName, n, "Small Warship, Small Warship,");
    n = AddStr2Array(&sRndShpEnLgWarName, n, "Large Warship, Large Warship,");
    
    Based on the following form:
    Code:
    n = AddStr2Array(&sRndShpSpName, n, "Alfonso XIII,Almansa,Almirante Oquendo,Almirante Cervera,Almirante Juan Ferrandiz,Alsedo,Aventura,Africa,Aguila,Amazona,Ambrosia,Amfitrite");
    
    What is there to trace when all of the ships names are there.... I put a trace at the top of the file that states: "string added to ship/fort", but it doesn't post on the logs....

    I also moved the traces of the successful naming after the function call to set the ship name and they still go fine... I guess the problem now is with the array size maybe... The buffer may have been designed for a large amount of strings, but not a small amount....

    Edit: I have now replaced the small strings with larger ones to see if it makes a difference in the fucntions....

    Edit2: The strings in ships_name.c made no difference in errors or the processing... Also I think the values aren't coming through properly. Everything is being spit out as a large warship.
     
    Last edited: Sep 13, 2017
  11. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    214
    Two things wrong. Remove the trailing comma on each string. Also, the n variable needs to reset to zero when the destination string variable changes, because the number returned is the new size and what you are doing is sending the new size for the prior assignment to a completely different destination variable in the next assignment. Change to this:


    Code:
        n = 0;
        n = AddStr2Array(&sRndShpEnTraName, n, "Trader,Trader");
        n = 0;
        n = AddStr2Array(&sRndShpEnHybName, n, "Hybrid,Hybrid");
        n = 0;
        n = AddStr2Array(&sRndShpEnSmWarName, n, "Small Warship,Small Warship");
        n = 0;
        n = AddStr2Array(&sRndShpEnLgWarName, n, "Large Warship,Large Warship");
     
  12. Modder01

    Modder01 Freebooter Storm Modder

    Joined:
    Feb 1, 2014
    Messages:
    294
    Gender:
    Male
    Location:
    Oxford, Michigan, USA
    That is done...
    New errors (with old ones unresolved):
    Code:
    RUNTIME ERROR - file: ships\ships.c; line: 107
    Invalid index -1 [size:1]
    RUNTIME ERROR - file: ships\ships.c; line: 107
    invalid ref
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: ships\ships.c; line: 107
    Invalid index -1 [size:1]
    RUNTIME ERROR - file: ships\ships.c; line: 107
    invalid ref
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: ships\ships.c; line: 107
    Invalid index -1 [size:1]
    RUNTIME ERROR - file: ships\ships.c; line: 107
    invalid ref
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: ships\ships.c; line: 107
    Invalid index -1 [size:1]
    RUNTIME ERROR - file: ships\ships.c; line: 107
    invalid ref
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: ships\ships.c; line: 107
    Invalid index -1 [size:1]
    RUNTIME ERROR - file: ships\ships.c; line: 107
    invalid ref
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: ships\ships.c; line: 107
    Invalid index -1 [size:1]
    RUNTIME ERROR - file: ships\ships.c; line: 107
    invalid ref
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: ships\ships.c; line: 107
    Invalid index -1 [size:1]
    RUNTIME ERROR - file: ships\ships.c; line: 107
    invalid ref
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: ships\ships.c; line: 107
    Invalid index -1 [size:1]
    RUNTIME ERROR - file: ships\ships.c; line: 107
    invalid ref
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: ships\ships.c; line: 107
    Invalid index -1 [size:1]
    RUNTIME ERROR - file: ships\ships.c; line: 107
    invalid ref
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: ships\ships.c; line: 107
    Invalid index -1 [size:1]
    RUNTIME ERROR - file: ships\ships.c; line: 107
    invalid ref
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: ships\ships.c; line: 107
    Invalid index -1 [size:1]
    RUNTIME ERROR - file: ships\ships.c; line: 107
    invalid ref
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: ships\ships.c; line: 107
    Invalid index -1 [size:1]
    RUNTIME ERROR - file: ships\ships.c; line: 107
    invalid ref
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: ships\ships.c; line: 107
    Invalid index -1 [size:1]
    RUNTIME ERROR - file: ships\ships.c; line: 107
    invalid ref
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: ships\ships.c; line: 107
    Invalid index -1 [size:1]
    RUNTIME ERROR - file: ships\ships.c; line: 107
    invalid ref
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: ships\ships.c; line: 107
    Invalid index -1 [size:1]
    RUNTIME ERROR - file: ships\ships.c; line: 107
    invalid ref
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: ships\ships.c; line: 107
    Invalid index -1 [size:1]
    RUNTIME ERROR - file: ships\ships.c; line: 107
    invalid ref
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: ships\ships.c; line: 107
    Invalid index -1 [size:1]
    RUNTIME ERROR - file: ships\ships.c; line: 107
    invalid ref
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    missed attribute: fastreload
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    no rAP data
    
     
  13. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    214
    This looks to be a bug in the original code. You have one entry in your array and the others have very many, so this doesn't surface. The other side effect is that the last entry of the large arrays will also never be chosen. Change the calls to GetRandSubstring to size minus one instead of -2. Since you have only 1 in those new arrays right now, you are getting an index of -1, which is invalid:

    GetRandSubString(rMassiveOfNames[rand(iMassiveOfNamesSize-1)]);
     
  14. Modder01

    Modder01 Freebooter Storm Modder

    Joined:
    Feb 1, 2014
    Messages:
    294
    Gender:
    Male
    Location:
    Oxford, Michigan, USA
    Ok now it works... I see the strings working, however the troubling thing is that all of the ships show "Large Warship" When some are definitely small warships and others still are traders/hybrids.... There seems to be a problem with the input... Class is unchanged from class 7 which is default and it also seems the type merchant and war values do not change when they are reassigned for each ship...

    EDIT: Did a second run and it has stopped working again... error log:
    Code:
    COMPILE ERROR - file: net\client\weather\Astronomy.c; line: 124
    Missed array index
    COMPILE ERROR - file: net\client\weather\Astronomy.c; line: 124
    Missed array index
    COMPILE ERROR - file: net\client\weather\Astronomy.c; line: 124
    Missed array index
    COMPILE ERROR - file: net\client\weather\Astronomy.c; line: 124
    Missed array index
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    missed attribute: fastreload
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    no rAP data
    
    Now it seems that only on a new game, without re-saving can I duplicate it...
     
    Last edited: Sep 14, 2017
  15. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    214
    Upon review, there were some logic issues as ships can be two types. Also remove the check for <=6 as anything >3 should suffice for small. The two functions:

    Code:
    void SetRandomNameToShip(ref rCharacter)
    {
        ref rMassiveOfNames;
    
        int st = -1;
        bool isMerchant = false;
        bool isWar = false;
        int nClass = 7;
    
       if(CheckAttribute(rCharacter,"ship.type"))
            st = sti(rCharacter.ship.type);
    
       if(st >= 0 && st < SHIP_TYPES_QUANTITY_WITH_FORT) {
           ref rShip = &RealShips[st];
           if(CheckAttribute(rShip, "type.merchant") && sti(rShip.type.merchant)==true)
                isMerchant = true;
           if(CheckAttribute(rShip, "type.war") && sti(rShip.type.war)==true)
                isWar = true;
           if(CheckAttribute(rShip, "Class"))
                nClass = sti(rShip.Class);
       }
    
        if(!CheckAttribute(rCharacter, "nation"))
        {
            rCharacter.nation = PIRATE;
        }
        if(sti(rCharacter.nation) == -1)
        {
            rCharacter.nation = PIRATE;
        }
    
        switch (sti(rCharacter.nation))
        {
            case ENGLAND:
                if(isMerchant==true && isWar==true){
                    makeref(rMassiveOfNames, sRndShpEnHybName);
                }else {
                    if(isMerchant==true){
                        makeref(rMassiveOfNames, sRndShpEnTraName);
                    }
                    else {
                        if(nClass >= 3) {
                            makeref(rMassiveOfNames, sRndShpEnSmWarName);
                        } else {
                            makeref(rMassiveOfNames, sRndShpEnLgWarName);
                        }
                    }
                }
            break;
            case FRANCE:
                makeref(rMassiveOfNames, sRndShpFrName);
            break;
            case SPAIN:
                makeref(rMassiveOfNames, sRndShpSpName);
            break;
            case PIRATE:
                makeref(rMassiveOfNames, sRndShpPiName);
            break;
            case HOLLAND:
                makeref(rMassiveOfNames, sRndShpHoName);
            break;
            case SMUGGLER:
                makeref(rMassiveOfNames, sRndShpPiName);
            break;
        }
        int iMassiveOfNamesSize = GetArraySize(rMassiveOfNames);
        rCharacter.Ship.Name = GetRandSubString(rMassiveOfNames[rand(iMassiveOfNamesSize-1)]);
    }
    
    string generateRandomNameToShip(int iNation, ref rCharacter)
    {
        ref rMassiveOfNames;
    
        int st = -1;
        bool isMerchant = false;
        bool isWar = false;
        int nClass = 7;
    
        if(CheckAttribute(rCharacter,"ship.type"))
            st = sti(rCharacter.ship.type);
    
        if(st >= 0 && st < SHIP_TYPES_QUANTITY_WITH_FORT) {
            ref rShip = &RealShips[st];
    
            if(CheckAttribute(rShip, "type.merchant") && sti(rShip.type.merchant)==true)
                isMerchant = true;
            if(CheckAttribute(rShip, "type.war") && sti(rShip.type.war)==true)
                isWar = true;
            if(CheckAttribute(rShip, "Class"))
                nClass = sti(rShip.Class);
            else
                trace("This is no ship class");
        }
    
        if(!CheckAttribute(rCharacter, "nation"))
        {
            iNation = PIRATE;
        }
        if(sti(rCharacter.nation) == -1)
        {
            iNation = PIRATE;
        }
    
        switch (iNation)
        {
            case ENGLAND:
                if(isMerchant==true && isWar==true){
                    makeref(rMassiveOfNames, sRndShpEnHybName);
                }else {
                    if(isMerchant==true){
                        makeref(rMassiveOfNames, sRndShpEnTraName);
                    }
                    else {
                        if(nClass >= 3) {
                            makeref(rMassiveOfNames, sRndShpEnSmWarName);
                        } else {
                            makeref(rMassiveOfNames, sRndShpEnLgWarName);
                        }
                    }
                }
            break;
            case FRANCE:
                makeref(rMassiveOfNames, sRndShpFrName);
            break;
            case SPAIN:
                makeref(rMassiveOfNames, sRndShpSpName);
            break;
            case PIRATE:
                makeref(rMassiveOfNames, sRndShpPiName);
            break;
            case HOLLAND:
                makeref(rMassiveOfNames, sRndShpHoName);
            break;
            case SMUGGLER:
                makeref(rMassiveOfNames, sRndShpPiName);
            break;
        }
        int iMassiveOfNamesSize = GetArraySize(rMassiveOfNames);
        string sName = GetRandSubString(rMassiveOfNames[rand(iMassiveOfNamesSize-1)]);
    
        return sName;
    }
     
  16. Modder01

    Modder01 Freebooter Storm Modder

    Joined:
    Feb 1, 2014
    Messages:
    294
    Gender:
    Male
    Location:
    Oxford, Michigan, USA
    This works better now... What worries me is that the ship names on some examples such as the Xebec, are incorrectly showing a blank string... Also the ships bought at the shipyard have empty strings for names too... EDIT: The Latest Run is shown in the error log and compile log.

    Keep in mind the the latest run is a longer one.
    Error log:
    Code:
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    missed attribute: fastreload
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    no rAP data
    RUNTIME ERROR - file: islands\islands_loader.c; line: 187
    Invalid index -1 [size:19]
    RUNTIME ERROR - file: islands\islands_loader.c; line: 187
    invalid array index
    RUNTIME ERROR - file: islands\islands_loader.c; line: 187
    function 'getRTclosestIsland' stack error
    RUNTIME ERROR - file: islands\islands_loader.c; line: 31
    Unknown data type
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    missed attribute: islands
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    no rAP data
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    missed attribute: islands
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    no rAP data
    RUNTIME ERROR - file: sound.c; line: 171
    missed attribute: fastreload
    RUNTIME ERROR - file: sound.c; line: 171
    no rAP data
    RUNTIME ERROR - file: sound.c; line: 163
    Invalid index -1 [size:20]
    RUNTIME ERROR - file: sound.c; line: 163
    invalid array index
    RUNTIME ERROR - file: sound.c; line: 163
    function 'GetColonyNation' stack error
    RUNTIME ERROR - file: sound.c; line: 171
    Unknown data type
    COMPILE ERROR - file: net\client\weather\Astronomy.c; line: 124
    Missed array index
    COMPILE ERROR - file: net\client\weather\Astronomy.c; line: 124
    Missed array index
    COMPILE ERROR - file: net\client\weather\Astronomy.c; line: 124
    Missed array index
    COMPILE ERROR - file: net\client\weather\Astronomy.c; line: 124
    Missed array index
    RUNTIME ERROR - file: sound.c; line: 171
    missed attribute: fastreload
    RUNTIME ERROR - file: sound.c; line: 171
    no rAP data
    RUNTIME ERROR - file: sound.c; line: 163
    Invalid index -1 [size:20]
    RUNTIME ERROR - file: sound.c; line: 163
    invalid array index
    RUNTIME ERROR - file: sound.c; line: 163
    function 'GetColonyNation' stack error
    RUNTIME ERROR - file: sound.c; line: 171
    Unknown data type
    RUNTIME ERROR - file: sound.c; line: 171
    missed attribute: fastreload
    RUNTIME ERROR - file: sound.c; line: 171
    no rAP data
    RUNTIME ERROR - file: sound.c; line: 163
    Invalid index -1 [size:20]
    RUNTIME ERROR - file: sound.c; line: 163
    invalid array index
    RUNTIME ERROR - file: sound.c; line: 163
    function 'GetColonyNation' stack error
    RUNTIME ERROR - file: sound.c; line: 171
    Unknown data type
    RUNTIME ERROR - file: sea_ai\AITasks\AIAttack.c; line: 133
    missed attribute: pos
    RUNTIME ERROR - file: sea_ai\AITasks\AIAttack.c; line: 133
    null ap
    RUNTIME ERROR - file: sea_ai\AITasks\AIAttack.c; line: 133
    no rAP data
    RUNTIME ERROR - file: sea_ai\AITasks\AIAttack.c; line: 133
    missed attribute: pos
    RUNTIME ERROR - file: sea_ai\AITasks\AIAttack.c; line: 133
    null ap
    RUNTIME ERROR - file: sea_ai\AITasks\AIAttack.c; line: 133
    no rAP data
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    missed attribute: fastreload
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    no rAP data
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    missed attribute: fastreload
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    no rAP data
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    missed attribute: fastreload
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    no rAP data
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    missed attribute: fastreload
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    no rAP data
    RUNTIME ERROR - file: islands\islands_loader.c; line: 187
    Invalid index -1 [size:19]
    RUNTIME ERROR - file: islands\islands_loader.c; line: 187
    invalid array index
    RUNTIME ERROR - file: islands\islands_loader.c; line: 187
    function 'getRTclosestIsland' stack error
    RUNTIME ERROR - file: islands\islands_loader.c; line: 31
    Unknown data type
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    missed attribute: islands
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    no rAP data
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    missed attribute: islands
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    no rAP data
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    missed attribute: islands
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    no rAP data
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    missed attribute: islands
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    no rAP data
    RUNTIME ERROR - file: islands\islands_loader.c; line: 187
    Invalid index -1 [size:19]
    RUNTIME ERROR - file: islands\islands_loader.c; line: 187
    invalid array index
    RUNTIME ERROR - file: islands\islands_loader.c; line: 187
    function 'getRTclosestIsland' stack error
    RUNTIME ERROR - file: islands\islands_loader.c; line: 31
    Unknown data type
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    missed attribute: islands
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    no rAP data
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    missed attribute: islands
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 46
    no rAP data
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    missed attribute: islands
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    no rAP data
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    missed attribute: islands
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    no rAP data
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    missed attribute: fastreload
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    no rAP data
    RUNTIME ERROR - file: utils.c; line: 19
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 35
    Invalid string argument
    RUNTIME ERROR - file: utils.c; line: 39
    Invalid string argument
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    missed attribute: fastreload
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    no rAP data
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    missed attribute: fastreload
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    no rAP data
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    missed attribute: fastreload
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    no rAP data
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    missed attribute: fastreload
    RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 2468
    no rAP data
    RUNTIME ERROR - file: islands\islands_loader.c; line: 187
    Invalid index -1 [size:19]
    RUNTIME ERROR - file: islands\islands_loader.c; line: 187
    invalid array index
    RUNTIME ERROR - file: islands\islands_loader.c; line: 187
    function 'getRTclosestIsland' stack error
    RUNTIME ERROR - file: islands\islands_loader.c; line: 31
    Unknown data type
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    missed attribute: islands
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    no rAP data
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    missed attribute: islands
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    null ap
    RUNTIME ERROR - file: islands\islands_loader.c; line: 47
    no rAP data
    
    Compile Log:
    Code:
    ExternControlsInit
    Init encounters complete.
    Init weathers complete. 35 weathers found.
    PauseAllSounds
    ResetSoundScheme
    proc_break_video()
    PauseAllSounds
    ResetSoundScheme
    proc_break_video()
    PauseAllSounds
    ResetSoundScheme
    proc_break_video()
    PauseAllSounds
    ResetSoundScheme
    proc_break_video()
    PauseAllSounds
    ResetSoundScheme
    proc_break_video()
    ExternControlsInit
    DeckCamera_Turn_V
    Number of locations: 274
    bool CreateParticleEntity()
    
    characters quantity is 246
    
    
    string added to ship/fort
    ResetSoundScheme
    SetSoundScheme: mainmenu_night_rain
    SETTING MUSIC: Music_main_theme
    error (save_load.c) : PlayerProfile.name attribute not found.
    ResetSoundScheme
    SetSoundScheme: mainmenu_night_rain
    SETTING MUSIC: Music_main_theme
    ResetSoundScheme
    Find files : 0
    Number of locations: 274
    bool CreateParticleEntity()
    
    characters quantity is 246
    
    ERROR! Cargo space overup (character=1500,Quantity=100)
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Fort Renamed!
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    Character Ship have no HP value
    !!! Reload to 15
    LoadLocation(ref loc) Bridgetown_town
    PauseAllSounds
    PauseAllSounds
    ResetSoundScheme
    ResetSoundScheme
    SetSoundScheme: town_day
    SETTING MUSIC: music_eng_town
    Create 3D Sound <seashore> for locator <seashore01> into pos:(1.34652,0,38.3628)
    Create 3D Sound <fountain> for locator <fountain01> into pos:(-4.24645e-005,6.49856,-22.9992)
    Create 3D Sound <tavern> for locator <tavern01> into pos:(-13.1989,5.37277,2.02413)
    Create 3D Sound <shipyard> for locator <shipyard01> into pos:(-18.4345,3.24813,16.8705)
    Create 3D Sound <church> for locator <church01> into pos:(-24.1764,9.98409,-39.2192)
    ResumeAllSounds
    Template <goto> -> path not found chr.id = Gerard_Grover_-30496
    Template <follow> -> timeout chr.id = Map Man
    Template <follow> -> teleport chr.id = Map Man to pos(4.3268, 2.6489, 26.536)
    Quest ADDED
    *** blaze map given
    locator_name = reload1_back lockedReloadLocator =
    reload_cur_island_index = -1
    reload_cur_location_index = 15
    reload_island_index = 0
    reload_location_index = -1
    Start reload
    ResetSoundScheme
    PauseAllSounds
    ReloadStartFade
    UnloadLocation(aref loc) Bridgetown_town
    ReloadEndFade
    Load from location to sea sLoc = l1, x = -1246.32,z = -1379.55
    Fort Login rCharacter.Ship.Type is 7
    Character Ship have no HP value
    sLocatorGroup is IslandShips1 sLocator is Ship_6
    Character Ship have no HP value
    sLocatorGroup is IslandShips1 sLocator is Ship_4
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_day
    ResumeAllSounds
    PauseAllSounds
    ResetSoundScheme
    ResetSoundScheme
    AddSoundScheme: sea_map
    SETTING MUSIC: music_map
    ResumeAllSounds
    PauseAllSounds
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_day
    ResumeAllSounds
    PauseAllSounds
    ResetSoundScheme
    ResetSoundScheme
    AddSoundScheme: sea_map
    SETTING MUSIC: music_map
    ResumeAllSounds
    PauseAllSounds
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_day
    ResumeAllSounds
    PauseAllSounds
    ResetSoundScheme
    ResetSoundScheme
    AddSoundScheme: sea_map
    SETTING MUSIC: music_map
    ResumeAllSounds
    Êâåñòîâîìó ýíêàóíòåðó íå íàçíà÷åí ïåðñîíàæ!
    PauseAllSounds
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_day
    ResumeAllSounds
    PauseAllSounds
    ResetSoundScheme
    ResetSoundScheme
    AddSoundScheme: sea_map
    SETTING MUSIC: music_map
    ResumeAllSounds
    PauseAllSounds
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_day
    ResumeAllSounds
    SETTING MUSIC: music_sea_battle
    fmax=8.8, fMin = 5., new speed = 4.4361
    getRTclosestIsland. curr island:
    CheckIslandChange: nextisland=1
    CheckIslandChange: distToCurIsland=50000, distToClosestIsland=1090.3
    DirectsailCheck; next enemy: -1 dist: 0
    DirectsailCheck; next neutral ship: -1 dist: 0
    Directsail aborted in battle
    PauseAllSounds
    ResetSoundScheme
    ResetSoundScheme
    PauseAllSounds
    LoadLocation(ref loc) Boarding Deck_02
    Torch_deck created
    Torch_deck created
    Torch_deck created
    Torch_deck created
    SETTING MUSIC: music_bitva
    ResetSoundScheme
    SetSoundScheme: deck
    SETTING MUSIC: music_bitva
    Âêëþ÷èòü øóìà àáîðäàæà
    Create 3D Sound <torch_deck> for locator <torch_deck01> into pos:(6.28286,5.88794,2.42251)
    Create 3D Sound <torch_deck> for locator <torch_deck02> into pos:(6.03167,6.32969,-12.6051)
    Create 3D Sound <torch_deck> for locator <torch_deck03> into pos:(-5.74788,5.89397,-12.2142)
    Create 3D Sound <torch_deck> for locator <torch_deck04> into pos:(-5.68567,5.86421,0.718437)
    uups
    ResetSoundScheme
    bool CreateParticleEntity()
    ResetSoundScheme
    SetSoundScheme: mainmenu_night_rain
    SETTING MUSIC: Music_main_theme
    ResetSoundScheme
    onLoadReInit Reinitializing
    ResetSoundScheme
    bool CreateParticleEntity()
    Init weathers complete. 35 weathers found.
    Ship_LoadShip = 1
    Ship_LoadShip = 1825
    Ship_LoadShip = 1826
    Ship_LoadShip = 1827
    iBallCharacterIndex = 1
    Ship_LoadShip = 1828
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_day
    ResumeAllSounds
    PauseAllSounds
    ResetSoundScheme
    ResetSoundScheme
    PauseAllSounds
    LoadLocation(ref loc) Boarding Deck_02
    Torch_deck created
    Torch_deck created
    Torch_deck created
    Torch_deck created
    SETTING MUSIC: music_bitva
    ResetSoundScheme
    SetSoundScheme: deck
    SETTING MUSIC: music_bitva
    Âêëþ÷èòü øóìà àáîðäàæà
    Create 3D Sound <torch_deck> for locator <torch_deck01> into pos:(6.28286,5.88794,2.42251)
    Create 3D Sound <torch_deck> for locator <torch_deck02> into pos:(6.03167,6.32969,-12.6051)
    Create 3D Sound <torch_deck> for locator <torch_deck03> into pos:(-5.74788,5.89397,-12.2142)
    Create 3D Sound <torch_deck> for locator <torch_deck04> into pos:(-5.68567,5.86421,0.718437)
    Âûêëþ÷èòü øóìà àáîðäàæà
    SETTING MUSIC: music_spokplavanie
    Find files : 5
    Find file : england.tga.tx
    Find file : france.tga.tx
    Find file : holland.tga.tx
    Find file : pirate.tga.tx
    Find file : spain.tga.tx
    ScrollGetTexture: 246893568, interfaces\sails\blue.tga
    ScrollGetTexture: 246887072, interfaces\sails\green.tga
    ScrollGetTexture: 132837056, interfaces\sails\black.tga
    ScrollGetTexture: 132839136, RESOURCE\\textures\net\sails\england.tga
    ScrollGetTexture: 132839424, RESOURCE\\textures\net\sails\france.tga
    ScrollGetTexture: 132841792, RESOURCE\\textures\net\sails\spain.tga
    iStep is 10
    iStep is 11
    iStep is 11
    iStep is 12
    iStep is 12
    iStep is 13
    iStep is 13
    iStep is 14
    iStep is 14
    iStep is 15
    iStep is 15
    iStep is 16
    iStep is 16
    iStep is 15
    iStep is 14
    iStep is 15
    iStep is 16
    iStep is 17
    iStep is 17
    iStep is 18
    iStep is 18
    iStep is 19
    iStep is 19
    iStep is 20
    iStep is 20
    iStep is 21
    iStep is 21
    iStep is 22
    iStep is 22
    iStep is 23
    iStep is 23
    iStep is 24
    iStep is 24
    iStep is 25
    iStep is 25
    iStep is 26
    iStep is 26
    iStep is 27
    iStep is 27
    iStep is 28
    iStep is 28
    iStep is 29
    iStep is 29
    iStep is 30
    iStep is 30
    iStep is 24
    iStep is 24
    iStep is 7
    iStep is 8
    iStep is 9
    iStep is 10
    iStep is 11
    iStep is 11
    iStep is 12
    iStep is 12
    iStep is 13
    iStep is 13
    iStep is 14
    iStep is 14
    iStep is 15
    iStep is 15
    iStep is 16
    iStep is 16
    iStep is 17
    iStep is 17
    iStep is 18
    iStep is 18
    iStep is 19
    iStep is 19
    iStep is 20
    iStep is 20
    iStep is 21
    iStep is 21
    iStep is 22
    iStep is 22
    iStep is 23
    iStep is 23
    iStep is 24
    iStep is 24
    iStep is 25
    iStep is 25
    iStep is 26
    iStep is 26
    iStep is 27
    iStep is 27
    iStep is 26
    iStep is 25
    iStep is 24
    iStep is 23
    iStep is 24
    iStep is 25
    iStep is 26
    iStep is 25
    iStep is 24
    ResetSoundScheme
    PauseAllSounds
    UnloadLocation(aref loc) Boarding Deck_02
    LoadLocation(ref loc) CaptainCabine
    SETTING MUSIC: music_bitva
    ResetSoundScheme
    SetSoundScheme: cabine
    SETTING MUSIC: music_bitva
    ResetSoundScheme
    PauseAllSounds
    UnloadLocation(aref loc) CaptainCabine
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_day
    ResumeAllSounds
    SETTING MUSIC: music_spokplavanie
    PauseAllSounds
    ResetSoundScheme
    ResetSoundScheme
    AddSoundScheme: sea_map
    SETTING MUSIC: music_map
    ResumeAllSounds
    Warning! World map ship quantity < 0 : numShips = -2
    pchar.worldmap.shipcounter = 27
    Êâåñòîâîìó ýíêàóíòåðó íå íàçíà÷åí ïåðñîíàæ!
    PauseAllSounds
    Fort Login rCharacter.Ship.Type is 17
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_day
    ResumeAllSounds
    PauseAllSounds
    ResetSoundScheme
    ResetSoundScheme
    AddSoundScheme: sea_map
    SETTING MUSIC: music_map
    ResumeAllSounds
    Êâåñòîâîìó ýíêàóíòåðó íå íàçíà÷åí ïåðñîíàæ!
    Êâåñòîâîìó ýíêàóíòåðó íå íàçíà÷åí ïåðñîíàæ!
    PauseAllSounds
    Fort Login rCharacter.Ship.Type is 14
    sLocatorGroup is IslandShips1 sLocator is Ship_2
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_day
    ResumeAllSounds
    PauseAllSounds
    ResetSoundScheme
    locator_name = reload_1 lockedReloadLocator =
    reload_cur_island_index = 7
    reload_cur_location_index = -1
    reload_island_index = -1
    reload_location_index = 161
    Start reload
    ResetSoundScheme
    PauseAllSounds
    ReloadStartFade
    ReloadEndFade
    LoadLocation(ref loc) Nevis_town
    Generate Slaves Quest Begin
    SETTING MUSIC: music_map
    ResetSoundScheme
    SetSoundScheme: town_day
    SETTING MUSIC: music_eng_town
    Create 3D Sound <seashore> for locator <seashore01> into pos:(-36.897,0,55.8117)
    Create 3D Sound <tavern> for locator <tavern01> into pos:(-21.9939,3.43017,26.9634)
    Create 3D Sound <shipyard> for locator <shipyard01> into pos:(-64.1066,3.56796,40.9408)
    Create 3D Sound <church> for locator <church01> into pos:(-50.1409,7.36316,-19.9499)
    Template <goto> -> path not found chr.id = Cole_Bighead_-51818
    locator_name = reload5_back lockedReloadLocator =
    reload_cur_island_index = -1
    reload_cur_location_index = 161
    reload_island_index = -1
    reload_location_index = 166
    Start reload
    ResetSoundScheme
    PauseAllSounds
    ReloadStartFade
    UnloadLocation(aref loc) Nevis_town
    ReloadEndFade
    LoadLocation(ref loc) Nevis_Shipyard
    LocLoadShips: Can't find Location.locators.ships in location: Nevis_Shipyard
    ResetSoundScheme
    SetSoundScheme: shipyard
    SETTING MUSIC: music_shipyard
    locator_name = reload1_back lockedReloadLocator =
    reload_cur_island_index = -1
    reload_cur_location_index = 166
    reload_island_index = -1
    reload_location_index = 161
    Start reload
    ResetSoundScheme
    PauseAllSounds
    ReloadStartFade
    UnloadLocation(aref loc) Nevis_Shipyard
    ReloadEndFade
    LoadLocation(ref loc) Nevis_town
    Generate Slaves Quest Begin
    Template <goto> -> path not found chr.id = Finian_Drake_-19960
    ResetSoundScheme
    SetSoundScheme: town_day
    SETTING MUSIC: music_eng_town
    Create 3D Sound <seashore> for locator <seashore01> into pos:(-36.897,0,55.8117)
    Create 3D Sound <tavern> for locator <tavern01> into pos:(-21.9939,3.43017,26.9634)
    Create 3D Sound <shipyard> for locator <shipyard01> into pos:(-64.1066,3.56796,40.9408)
    Create 3D Sound <church> for locator <church01> into pos:(-50.1409,7.36316,-19.9499)
    locator_name = reload1_back lockedReloadLocator =
    reload_cur_island_index = -1
    reload_cur_location_index = 161
    reload_island_index = 7
    reload_location_index = -1
    Start reload
    ResetSoundScheme
    PauseAllSounds
    ReloadStartFade
    UnloadLocation(aref loc) Nevis_town
    ReloadEndFade
    Load from location to sea sLoc = l1, x = -1018.6,z = -978.221
    Fort Login rCharacter.Ship.Type is 14
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_day
    ResumeAllSounds
    PauseAllSounds
    ResetSoundScheme
    ResetSoundScheme
    AddSoundScheme: sea_map
    SETTING MUSIC: music_map
    ResumeAllSounds
    PauseAllSounds
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_night
    SETTING MUSIC: music_enplavanie
    ResumeAllSounds
    PauseAllSounds
    ResetSoundScheme
    ResetSoundScheme
    AddSoundScheme: sea_map
    SETTING MUSIC: music_map
    ResumeAllSounds
    PauseAllSounds
    Fort Login rCharacter.Ship.Type is 14
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_night
    SETTING MUSIC: music_enplavanie
    ResumeAllSounds
    SETTING MUSIC: music_sea_battle
    Find files : 5
    Find file : england.tga.tx
    Find file : france.tga.tx
    Find file : holland.tga.tx
    Find file : pirate.tga.tx
    Find file : spain.tga.tx
    ScrollGetTexture: 246893568, interfaces\sails\blue.tga
    ScrollGetTexture: 246887072, interfaces\sails\green.tga
    ScrollGetTexture: 132837056, interfaces\sails\black.tga
    ScrollGetTexture: 132839136, RESOURCE\\textures\net\sails\england.tga
    ScrollGetTexture: 132839424, RESOURCE\\textures\net\sails\france.tga
    ScrollGetTexture: 132841792, RESOURCE\\textures\net\sails\spain.tga
    fmax=14., fMin = 0., new speed = 5.671
    getRTclosestIsland. curr island: Nevis
    CheckIslandChange: nextisland=1
    CheckIslandChange: distToCurIsland=723.35, distToClosestIsland=723.35
    For character 1 fall Mast name mast1 has index 1
    For character 1 fall Mast name mast2 has index 2
    SETTING MUSIC: music_spokplavanie
    SETTING MUSIC: music_sea_battle
    Find files : 5
    Find file : england.tga.tx
    Find file : france.tga.tx
    Find file : holland.tga.tx
    Find file : pirate.tga.tx
    Find file : spain.tga.tx
    ScrollGetTexture: 246893568, interfaces\sails\blue.tga
    ScrollGetTexture: 246887072, interfaces\sails\green.tga
    ScrollGetTexture: 132837056, interfaces\sails\black.tga
    ScrollGetTexture: 132839136, RESOURCE\\textures\net\sails\england.tga
    ScrollGetTexture: 132839424, RESOURCE\\textures\net\sails\france.tga
    ScrollGetTexture: 132841792, RESOURCE\\textures\net\sails\spain.tga
    fmax=14., fMin = 0., new speed = 9.1117
    getRTclosestIsland. curr island: Nevis
    CheckIslandChange: nextisland=1
    CheckIslandChange: distToCurIsland=723.65, distToClosestIsland=723.65
    SETTING MUSIC: music_spokplavanie
    PauseAllSounds
    ResetSoundScheme
    ResetSoundScheme
    AddSoundScheme: sea_map
    SETTING MUSIC: music_map
    ResumeAllSounds
    PauseAllSounds
    Fort Login rCharacter.Ship.Type is 14
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_day
    ResumeAllSounds
    For character 1 fall Mast name mast1 has index 1
    For character 1 fall Mast name mast2 has index 2
    PauseAllSounds
    ResetSoundScheme
    locator_name = reload_1 lockedReloadLocator =
    reload_cur_island_index = 7
    reload_cur_location_index = -1
    reload_island_index = -1
    reload_location_index = 161
    Start reload
    ResetSoundScheme
    PauseAllSounds
    ReloadStartFade
    ReloadEndFade
    LoadLocation(ref loc) Nevis_town
    Generate Passenger Quest Begin
    For character 1 fall Mast name mast1 has index 1
    For character 1 fall Mast name mast2 has index 2
    ResetSoundScheme
    SetSoundScheme: town_day
    SETTING MUSIC: music_eng_town
    Create 3D Sound <seashore> for locator <seashore01> into pos:(-36.897,0,55.8117)
    Create 3D Sound <tavern> for locator <tavern01> into pos:(-21.9939,3.43017,26.9634)
    Create 3D Sound <shipyard> for locator <shipyard01> into pos:(-64.1066,3.56796,40.9408)
    Create 3D Sound <church> for locator <church01> into pos:(-50.1409,7.36316,-19.9499)
    Quest ADDED
    locator_name = reload5_back lockedReloadLocator =
    reload_cur_island_index = -1
    reload_cur_location_index = 161
    reload_island_index = -1
    reload_location_index = 166
    Start reload
    ResetSoundScheme
    PauseAllSounds
    ReloadStartFade
    UnloadLocation(aref loc) Nevis_town
    ReloadEndFade
    LoadLocation(ref loc) Nevis_Shipyard
    LocLoadShips: Can't find Location.locators.ships in location: Nevis_Shipyard
    ResetSoundScheme
    SetSoundScheme: shipyard
    SETTING MUSIC: music_shipyard
    
    
    Find files : 5
    Find file : england.tga.tx
    Find file : france.tga.tx
    Find file : holland.tga.tx
    Find file : pirate.tga.tx
    Find file : spain.tga.tx
    ScrollGetTexture: 246893568, interfaces\sails\blue.tga
    ScrollGetTexture: 246887072, interfaces\sails\green.tga
    ScrollGetTexture: 132837056, interfaces\sails\black.tga
    ScrollGetTexture: 132839136, RESOURCE\\textures\net\sails\england.tga
    ScrollGetTexture: 132839424, RESOURCE\\textures\net\sails\france.tga
    ScrollGetTexture: 132841792, RESOURCE\\textures\net\sails\spain.tga
    locator_name = reload1_back lockedReloadLocator =
    reload_cur_island_index = -1
    reload_cur_location_index = 166
    reload_island_index = -1
    reload_location_index = 161
    Start reload
    ResetSoundScheme
    PauseAllSounds
    ReloadStartFade
    UnloadLocation(aref loc) Nevis_Shipyard
    ReloadEndFade
    LoadLocation(ref loc) Nevis_town
    Generate Passenger Quest Begin
    ResetSoundScheme
    SetSoundScheme: town_day
    SETTING MUSIC: music_eng_town
    Create 3D Sound <seashore> for locator <seashore01> into pos:(-36.897,0,55.8117)
    Create 3D Sound <tavern> for locator <tavern01> into pos:(-21.9939,3.43017,26.9634)
    Create 3D Sound <shipyard> for locator <shipyard01> into pos:(-64.1066,3.56796,40.9408)
    Create 3D Sound <church> for locator <church01> into pos:(-50.1409,7.36316,-19.9499)
    locator_name = reload1_back lockedReloadLocator =
    reload_cur_island_index = -1
    reload_cur_location_index = 161
    reload_island_index = 7
    reload_location_index = -1
    Start reload
    ResetSoundScheme
    PauseAllSounds
    ReloadStartFade
    UnloadLocation(aref loc) Nevis_town
    ReloadEndFade
    Load from location to sea sLoc = l1, x = -1018.6,z = -978.221
    Fort Login rCharacter.Ship.Type is 14
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_day
    ResumeAllSounds
    PauseAllSounds
    ResetSoundScheme
    locator_name = reload_1 lockedReloadLocator =
    reload_cur_island_index = 7
    reload_cur_location_index = -1
    reload_island_index = -1
    reload_location_index = 161
    Start reload
    ResetSoundScheme
    PauseAllSounds
    ReloadStartFade
    ReloadEndFade
    LoadLocation(ref loc) Nevis_town
    ResetSoundScheme
    SetSoundScheme: town_day
    SETTING MUSIC: music_eng_town
    Create 3D Sound <seashore> for locator <seashore01> into pos:(-36.897,0,55.8117)
    Create 3D Sound <tavern> for locator <tavern01> into pos:(-21.9939,3.43017,26.9634)
    Create 3D Sound <shipyard> for locator <shipyard01> into pos:(-64.1066,3.56796,40.9408)
    Create 3D Sound <church> for locator <church01> into pos:(-50.1409,7.36316,-19.9499)
    locator_name = reload1_back lockedReloadLocator =
    reload_cur_island_index = -1
    reload_cur_location_index = 161
    reload_island_index = 7
    reload_location_index = -1
    Start reload
    ResetSoundScheme
    PauseAllSounds
    ReloadStartFade
    UnloadLocation(aref loc) Nevis_town
    ReloadEndFade
    Load from location to sea sLoc = l1, x = -1018.6,z = -978.221
    Fort Login rCharacter.Ship.Type is 14
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_day
    ResumeAllSounds
    PauseAllSounds
    ResetSoundScheme
    ResetSoundScheme
    AddSoundScheme: sea_map
    SETTING MUSIC: music_map
    ResumeAllSounds
    PauseAllSounds
    Fort Login rCharacter.Ship.Type is 13
    ERROR! Cargo space overup (character=253,Quantity=14000)
    ERROR! Cargo space overup (character=253,Quantity=10000)
    ERROR! Cargo space overup (character=253,Quantity=10000)
    ERROR! Cargo space overup (character=253,Quantity=10000)
    Warning! Language: string <Shore_15> hav`t translation into file <LocLables.txt>
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_day
    ResumeAllSounds
    PauseAllSounds
    ResetSoundScheme
    ResetSoundScheme
    AddSoundScheme: sea_map
    SETTING MUSIC: music_map
    ResumeAllSounds
    Êâåñòîâîìó ýíêàóíòåðó íå íàçíà÷åí ïåðñîíàæ!
    PauseAllSounds
    Fort Login rCharacter.Ship.Type is 13
    ERROR! Cargo space overup (character=253,Quantity=14000)
    ERROR! Cargo space overup (character=253,Quantity=10000)
    ERROR! Cargo space overup (character=253,Quantity=10000)
    ERROR! Cargo space overup (character=253,Quantity=10000)
    Warning! Language: string <Shore_15> hav`t translation into file <LocLables.txt>
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_day
    ResumeAllSounds
    PauseAllSounds
    ResetSoundScheme
    ResetSoundScheme
    AddSoundScheme: sea_map
    SETTING MUSIC: music_map
    ResumeAllSounds
    Êâåñòîâîìó ýíêàóíòåðó íå íàçíà÷åí ïåðñîíàæ!
    PauseAllSounds
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_day
    ResumeAllSounds
    PauseAllSounds
    ResetSoundScheme
    ResetSoundScheme
    AddSoundScheme: sea_map
    SETTING MUSIC: music_map
    ResumeAllSounds
    LAi_CharacterLogoff -> invalide character, no field <chr_ai.type>
    LAi_CharacterLogoff -> invalide character, no field <chr_ai.type>
    PauseAllSounds
    ResetSoundScheme
    SETTING MUSIC: music_spokplavanie
    AddSoundScheme: sea_night
    SETTING MUSIC: music_enplavanie
    ResumeAllSounds
    SETTING MUSIC: music_sea_battle
    For character 1825 fall Mast name mast1 has index 1
    fmax=14., fMin = 0., new speed = 9.0626
    getRTclosestIsland. curr island:
    CheckIslandChange: nextisland=1
    CheckIslandChange: distToCurIsland=50000, distToClosestIsland=743.13
    DirectsailCheck; next enemy: -1 dist: 0
    DirectsailCheck; next neutral ship: -1 dist: 0
    Directsail aborted in battle
    
     
    Last edited: Sep 14, 2017
  17. Modder01

    Modder01 Freebooter Storm Modder

    Joined:
    Feb 1, 2014
    Messages:
    294
    Gender:
    Male
    Location:
    Oxford, Michigan, USA
    I ran again, the compile and error logs from my last post hold true...
     
  18. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    214
    Well, this was a bit of a trick, but I think I have it. Regarding these errors:

    Code:
    COMPILE ERROR - file: net\client\weather\Astronomy.c; line: 124
    Missed array index
    COMPILE ERROR - file: net\client\weather\Astronomy.c; line: 124
    Missed array index
    COMPILE ERROR - file: net\client\weather\Astronomy.c; line: 124
    Missed array index
    COMPILE ERROR - file: net\client\weather\Astronomy.c; line: 124
    If you launch the game, then look for errors, you will note that those don't appear; they only appear after you load a game. You will also note that net\client\weather\Astronomy.c does not even have 124 lines. Fun.

    But after some mulling, I knew from experience of how game loads work, they take all the initially compiled, global variables, and for arrays, their size too, then iterate the save binary and load them one-by-one, iterating the binary-per-type size for the saved array size and load them. Here's the problem: The initial compile for some of the global arrays are set as size 2 (in particular, the man, woman, family names, ship names), then at run-time, they were resized with AddStr2Array. Those resizes are different in the save-game vs. the initial compile and then upon load, those cryptic errors surface.

    Knowing this, and reviewing later COAS code my theory of this save-game phenomena introducing problems was confirmed: this type of save-load problem with CT was fixed in COAS. I did the following, and no longer received those Astronomy.c errors upon save load:

    In Ships.c, redefine the arrays to be sized what they will ultimately be sized to with the AddStr2Array calls:

    Code:
    string   sRndShpSpName[17], sRndShpEnName[27], sRndShpEnTraName[2], sRndShpEnHybName[2], sRndShpEnSmWarName[2], sRndShpEnLgWarName[2], sRndShpFrName[19], sRndShpPiName[4], sRndShpHoName[10], sRndShpPoName[2];
    A note here: Our initial experiment only add 1 to those variables you introduced for England, but I soon found that you cannot initialize a variable to varname[1] for some reason and we start getting 'not an array' problems, so we are going to add at least 2 to your England variables, in ships_name.c:

    Code:
    n = AddStr2Array(&sRndShpEnTraName, n, "Trader,Trader");
        n = AddStr2Array(&sRndShpEnTraName, n, "Trader,Trader");
        n = 0;
        n = AddStr2Array(&sRndShpEnHybName, n, "Hybrid,Hybrid");
        n = AddStr2Array(&sRndShpEnHybName, n, "Hybrid,Hybrid");
        n = 0;
        n = AddStr2Array(&sRndShpEnSmWarName, n, "Small Warship,Small Warship");
        n = AddStr2Array(&sRndShpEnSmWarName, n, "Small Warship,Small Warship");
        n = 0;
        n = AddStr2Array(&sRndShpEnLgWarName, n, "Large Warship,Large Warship");
        n = AddStr2Array(&sRndShpEnLgWarName, n, "Large Warship,Large Warship");
    Now we need to handle the man, woman, family name problem. In globals.c, change their declarations:

    Code:
    string     sEnManNames[11], sEnWomenNames[5], sEnFamilies[109];
    string     sHoManNames[42], sHoWomenNames[16], sHoFamilies[201];
    string     sPoManNames[2], sPoWomenNames[2], sPoFamilies[2];
    string     sFrManNames[19], sFrWomenNames[20], sFrFamilies[167];
    string     sSpManNames[45], sSpWomenNames[17], sSpFamilies[71];
    Those sizes correspond to the number of AddStr2Array calls in characters_names.c

    Now, when I launch, start a new game, save, then reload that save, I don't see those Astronomy.c errors.
     
  19. Modder01

    Modder01 Freebooter Storm Modder

    Joined:
    Feb 1, 2014
    Messages:
    294
    Gender:
    Male
    Location:
    Oxford, Michigan, USA
    Ok there is something wrong here. I ran it two times and the logic still isn't working correctly... the Lugger is a Trader and is being assigned small warship instead while the Fluyt is also getting this treatment... No runtime errors except for battle_interface false positives for fastreload and no rap data...
     
  20. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    214
    I would expect that for the Lugger. The init shows:

    Lugger

    refship.Type.Merchant = false;
    refship.Type.War = true;

    But I do see a mistake that should resolve things. In Ships.c, the check for the array range is the wrong upper constraint. We need to use REAL_SHIPS_QUANTITY instead ofSHIP_TYPES_QUANTITY_WITH_FORT. Change in both places:

    if(st >= 0 && st < REAL_SHIPS_QUANTITY)
     

Share This Page