• New Horizons on Maelstrom
    Maelstrom New Horizons


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

Cannot Confirm Reputation Table out of bounds

Levis

Find(Rum) = false;
Staff member
Administrator
Creative Support
Programmer
Storm Modder
Code:
RUNTIME ERROR - file: characters\characterUtilite.c; line: 1804
invalid index 9 [size:9]
RUNTIME ERROR - file: characters\characterUtilite.c; line: 1804
invalid array index
RUNTIME ERROR - file: characters\characterUtilite.c; line: 1804
Unknown data type
RUNTIME ERROR - file: characters\characterUtilite.c; line: 1804
Unknown data type
RUNTIME ERROR - file: characters\characterUtilite.c; line: 1804
string function return UNKNOWN value
RUNTIME ERROR - file: characters\characterUtilite.c; line: 1791
Unknown data type
RUNTIME ERROR - file: characters\characterUtilite.c; line: 1791
Unknown data type

Concerning this piece of code:

Code:
string GetTranslatedReputationForSex(ref xi_refCharacter, string repName)
{
    if(!CheckAttribute(xi_refCharacter,"sex")) return XI_ConvertString("i"+repName);

    string chReputation = "";
    switch(xi_refCharacter.sex)
    {
        case "man": chReputation = XI_ConvertString("i"+repName); break;  <----------- 1791
        case "woman": chReputation = XI_ConvertString("w"+repName); break;
        chReputation = XI_ConvertString("i"+repName);
    }
    return chReputation;
}
//MAXIMUS <--

string GetReputationName(int reputation)
{
// KK -->
    int delta = roundup(makefloat(REPUTATION_MAX - REPUTATION_MIN + 1) / makefloat(REPUTATION_TABLE_SIZE));
    int rep = makeint(makefloat(reputation) / makefloat(delta));
    return ReputationTable[rep];  <---------------1804
// <-- KK
}

This happened when entering san juan for the first time (I think).
@Pieter Boelen did you change anything here?
 
The only vaguely related change I made was in PROGRAM\Characters\CharacterUtilite.c:
Code:
  if(!IsMainCharacter(chref)) return newVal;

   string prevName = GetTranslatedReputationForSex(chref, GetReputationName(prevVal));   // PB: Correction for female characters
   string newName  = GetTranslatedReputationForSex(chref, GetReputationName(newVal ));   // PB: Correction for female characters
   if(prevName!=newName)
   {
     string outString = XI_ConvertString("Your reputation")+" ";
     if(incr>0)   {outString+=XI_ConvertString("increase");}
     else   {outString+=XI_ConvertString("decrease");}
     outString += " " + XI_ConvertString("to") + " " + newName;             // PB: Correction for female characters
     LogIt(outString);
   }
   return newVal;
}
 
Havent seen it in a while.
 
Back
Top