That's a bizarre error to get at that line, for sure, so it's no wonder you were confused. The likely culprit is a conflict between the DAR includes and the HGLL includes - I had to do some tweaking to get the two include sets to play nice together, because I had some functions of the same name in both includes (not a clever thing to do). I believe there are two const strings of that name as well. That's a complex fix, because you have to go through both sets of includes and ensure that there are no overlapping function or const names, and THAT is further complicatd by the fact that some of the functions of the same name in the two includes have slightly different functionality - you can't just delete one of the two, in those cases (if they are identical, you can). Instead, you must rename one of the two in all functions that call it. For example, both sets of includes have this function (first one is HGLLs):
string LetoScript(string script)
{
SetLocalString(GetModule(), "NWNX!LETO!SCRIPT", script);
return GetLocalString(GetModule(), "NWNX!LETO!SCRIPT");
}
string LetoScript(string script) {
// Stores a var in the module which NWNX LETO then takes and works with.
SetLocalString(GetModule(), "NWNX!LETO!SCRIPT", script);
// Gets the var now changed by NWNX LETO back from the module and returns it.
return GetLocalString(GetModule(), "NWNX!LETO!SCRIPT");
}
Without the comments, they are identical, so you can simply delete one. Because you do, however, you'll have to include the include containing it in one scriptset in the other script set's file. For a non-identical function, however, you would have to rename one set of functions to something slightly different. All of the functions named SomeFunction in DAR would have to become SomeFunctionB, for instance, if HGLL also has a function named SomeFunction with a slight difference.
If that sounds a bit hairy, it is. It took me about 6 hours to do it because when I added HGLL to HG I had used DAR code in many MANY places already. Post your email, and I'll email you an mod containing properly merged scriptsets. In the meantime, however:
DAR has a timing issue I haven't yet got around to documenting on the Vault. The fix is simple enough.You need to export the character onenter of the first area, and then sun OnSubraceEnter around 6 seconds after that, INSTEAD of doing it oncliententer as DAR's vault version does. The issue is discovered/discussed in these two threads:
pages 2 and 3:
weathersong.infopop.cc/eve/forums/a/tpc/f/9616039431/m/1561059692/p/2(only 1 page):
weathersong.infopop.cc/eve/forums/a/tpc/f/9616039431/m/5381010833Because you've played in HG it'll be easier to explain. You need to ensure that the export is done onenter of an area, not oncliententer, because you can't export a character then, and the export is necessary to make the bicfile update so that findnewestbic will latch onto it sas the newest file in the player's folder. You THEN need to ensure a wait of around 6 seconds to give the export time to finish. That's because ExportSingleCharacter, unlike most nwscript functions, doesn't block - it doesn't finish before the function after it is callled, and may take quite awhile in some circumstances (like heavy lag). How to do this depends on your mod setup, whether you have an initial area that many players are just whisked through, like the Voyage in HG.
We export and then call OnSubraceEnter (originally in the DAR onCLIENTenter script) onenter of our second area, the docks, with a 6 second delay after the export:
object oPC = GetEnteringObject();
if (GetIsPC(oPC) == FALSE ){return;}
object oArea = GetArea(OBJECT_SELF);
string sRace;
//below if statement is part of subraces setup
if(!GetIsDM(oPC))
{
ExportSingleCharacter(oPC);
DelayCommand(6.0f, OnSubraceEnter(oPC));
}
We do it there to ensure the character isn't transitioning during the export; you can't save a transitioning character because there is no location information to write to the bicfile. Make sure to add the dar includes from the oncliententer script at the top of the area enter script.
Incidentally, making this change would solve your initial problem as well, because you no longer need to use dar's oncliententer at all, but you would soon run into issues with the functions in other places. Onclientexit, in particular, must be done a certain way to avoid conflict between the systems.
Hope that helps. I'll start hammering out a set of combined scripts in a test mod for you.
Best,
Funky