• 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 Dialogs: Weird error.log entry

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
@Levis: Do you understand this here?
Code:
Dialog: Missing dialog language file for: dialogs\-0.1004592
Dialog: Missing dialog file: dialogs\-0.1004592
 
it concerns this piece of code
Code:
string LoadDialogFile(string dialogFile) //Changed to string by levis
{
    //Check if the file is valid (moved check up front by levis)
    int iTmp = strlen(dialogFile);
    if(iTmp<3)
    {
        Trace("Dialog: Missing dialog file by length: " + dialogFile);
        return "";
    }
    // Get the Dialog path
    string sDialogDir = GetStorylinePath(FindCurrentStoryline()) + "dialogs\"; // KK
    string FullDialogPath = sDialogDir + dialogFile; // KK
    string sLanguageDir = LanguageGetLanguage(); // KK
    //Check if there is a storyline file else take the normal one
    if (FindFile("PROGRAM\\" + sDialogDir, "*.c", dialogFile) == "") {
        sDialogDir = "dialogs\";
        FullDialogPath = sDialogDir + dialogFile;
    }
    //Load the language file
    string Lfile = GetLanguageFile(dialogFile);
    bool HasLfile = true;
    if( !LoadSegment(Lfile))
    {
        Trace("Dialog: Missing dialog language file for: " + FullDialogPath);
        HasLfile = false;
    }
    //Load the dialog file
    if( !LoadSegment(FullDialogPath) )
    {
        Trace("Dialog: Missing dialog file: " + FullDialogPath);
        //If no dialog file then unload the languagefile
        if(HasLfile) { UnloadSegment(Lfile); }
        return "";
    }
    if(DIALOG_DEBUG) Trace("Dialog: Loaded dialog " + FullDialogPath + " Language " + Lfile);
    return sDialogDir;
}

some character must have gotten that as his dialog file ....
 
Except that doesn't even remotely resemble any sort of normal dialog file assignment! :shock
 
This seems to be one of the few places where there is a dynamic dialog assignment
Code:
void LEnc_LoginCorrectParams(ref location, aref chr, string group, string locator)
{
    ref player;
// Viper - Sword bugfix Begin
    //bool IsPistol, IsBlade, isBlade2;
    player = GetMainCharacter();
    string CurrentChar, CurModel, curAttr;
    CurrentChar = "char" + CurLandEnc.CurCharacter;
    //CurModel = "model" + (Rand(Makeint(CurLandEnc.(CurrentChar).modelQuantity)-1) + 1);
    chr.id = "Enc_Char" + CurLandEnc.CurCharacter;

    //chr.rank = makeint(player.rank) - 2 + rand(4); // NK
    if(makeint(chr.rank) <= 0) chr.rank = 1;

    //chr.experience = CalculateExperienceFromRank(sti(chr.rank));

    facemaker(chr);

    //curAttr = "char" + CurLandEnc.CurCharacter + ".pistol";
    //if(CheckAttribute(CurLandEnc, curAttr)) IsPistol = true;
    //IsPistol = CurLandEnc.(curAttr)
    //if(LogsToggle) Log_SetStringToLog(curAttr + " = " + IsPistol); // NK

    //curAttr = "char" + CurLandEnc.CurCharacter + ".sword";
    //if(CheckAttribute(CurLandEnc, curAttr)) IsBlade2 = true;
    //IsBlade = CurLandEnc.(curAttr)

    //LAi_NPC_Equip(chr, makeint(chr.rank), IsBlade, floatRet(IsPistol,0.5+frnd()/2.0,frnd()/2.0)); // NK
    //if (isBlade2 && !IsBlade && CheckCharacterItem(chr, "blade4") ) TakeItemFromCharacter(chr, "blade4");

// Viper - Sword bugfix End

    switch(CurLandEnc.(CurrentChar).type)
    {
        case "warrior":
            LAi_SetWarriorTypeNoGroup(chr);
            LAi_warrior_SetStay(chr, true);
            LAi_warrior_DialogEnable(chr, true);
        break;

        case "guardian":
            LAi_SetGuardianTypeNoGroup(chr);
        break;

        case "stay":
            LAi_SetStayTypeNoGroup(chr);
        break;

        case "Sit":
            // NK fix for women sitting 05-07-09
            if(!IsSittingCharacter(chr))// MAXIMUS: AOP characters got proper animation
            {
                LAi_SetActorTypeNoGroup(chr);
                string newgroup = "goto";
                string newloc = LAi_FindRandomLocator(newgroup);
                if(newloc == "")
                {
                    newgroup = "reload"
                    newloc = LAi_FindRandomLocator(newgroup);
                }
                TeleportCharacterToLocator(&chr, newgroup, newloc);
                LAi_ActorWaitDialog(chr, GetMainCharacter()); // enable dialog 05-07-14
            }
            else { LAi_SetSitTypeNoGroup(chr); }
            // NK <--
        break;

        case "Citizen":
            LAi_SetCitizenTypeNoGroup(chr);
        break;

        case "Actor":
            LAi_SetActorTypeNoGroup(chr);
        break;
    }

    //CalculateAppropriateSkills(chr);   

    //LAi_SetHP(chr, LAI_DEFAULT_HP + (makeint(player.rank)*5), LAI_DEFAULT_HP_MAX + (makeint(player.rank)*5));

    chr.Dialog.Filename = CurLandEnc.(CurrentChar).Dialog;
    chr.Dialog.CurrentNode = "Node_1";

}

This takes the dialog file assigned in the encounter templates.
Could it be there is one missing and therefore we get a weird value.
I haven't been able to replicate your error yet so maybe you could try again and see if you get an error here also?
Or else see if it gets assigned here? Or if you still have a save from after this error make a dump of CurLandEnc en see if the value is in there.
 
This was actually from a compile.log posted somewhere by @ANSEL, if I recall.
I have absolutely no clue how or when this got triggered.
 
I'm going to calls this cannot confirm. I really need a situation I can replicate to fix this.
 
Back
Top