|
Post by lucasmed on May 29, 2011 17:51:14 GMT
I am having a problem with the system in my module.
Ocasionally if a player does his level up, when he gets booted his character goes missing. I checked the servervault and the BIC file is converted to UTC, but the script fails to convert it back to BIC.
Does anyone know what can be happening?
Thanks. Lucas
|
|
|
Post by FunkySwerve on May 29, 2011 22:59:21 GMT
That's the result of a failed leto edit. Leto leaves the bic as a utc in this instance. We would get them very infrequently as well, but never traced down a cause, attributing it to a quirk in leto. So long as it's very infrequent, that is. If it's more commonplace, it's likely you're sending leto bad instructions, somehow, but if you haven't edited HGLL that shouldn't be an issue. It might be worth checking your nwnx_leto log next time it happens, to see what's happening. It's conceivable, for instance, that a nonstandard character in a character's name is mucking up the works, if you allow them on your server (we block them for a number of reasons, mostly database-related).
Funky
|
|
|
Post by lucasmed on May 30, 2011 20:40:09 GMT
Thanks for the answer, Funky. I didn't modify any of the scripts, though. Maybe it can be related with the nonstandard characters in the names. I will restrict their use to evaluate.
|
|
|
Post by lucasmed on Jun 1, 2011 2:07:13 GMT
Well... I still have the problem... Here is the log...
<1.598ms> Req:"SCRIPT", Param:"$RealFile = q<C:/NeverwinterNights/NWN/servervault/lurian-loire/> + FindNewestBic q<C:/NeverwinterNights/NWN/servervault/lurian-loire/>;$EditFile = $RealFile + '.utc';FileRename $RealFile, $EditFile;%bic = $EditFile or die;/SkillList/[6]/Rank = /SkillList/[6]/Rank +1; /LvlStatList/[0]/SkillList/[6]/Rank = /SkillList/[6]/Rank +1; /SkillList/[6]/Rank = /SkillList/[6]/Rank +1; /LvlStatList/[0]/SkillList/[6]/Rank = /SkillList/[6]/Rank +1; /SkillList/[6]/Rank = /SkillList/[6]/Rank +1; /LvlStatList/[0]/SkillList/[6]/Rank = /SkillList/[6]/Rank +1; /SkillList/[6]/Rank = /SkillList/[6]/Rank +1; /LvlStatList/[0]/SkillList/[6]/Rank = /SkillList/[6]/Rank +1; /Dex = /Dex + 1;/HitPoints = /HitPoints + 10; /LvlStatList/[5]/LvlStatHitDie = /LvlStatList/[5]/LvlStatHitDie + 10; /MaxHitPoints = /MaxHitPoints + 10; /CurrentHitPoints = /CurrentHitPoints + 10; /PregameCurrent = /PregameCurrent + 10; /Lootable = 46;%bic = '>';close %bic;FileRename $EditFile, $RealFile;"
Any ideas?
|
|
|
Post by FunkySwerve on Jun 1, 2011 4:44:57 GMT
Hrm, that looks more or less correct, so far as my several-year-old memories go. Is it happening more to one group than another? Say, higher level pcs, as opposed low 40s?
Also, are you using the plugins from the HGLL Vault page?
Funky
|
|
|
Post by lucasmed on Jun 1, 2011 22:23:29 GMT
Nope.. It is happening equally to all levels... I am using all the plugins recommended from the page. Some times it works fine, but when it starts to get messed it doesn't work at all. Isn't there a way to edit the script so that it doesn't convert the BIC file to UTC?
|
|
|
Post by FunkySwerve on Jun 2, 2011 0:12:40 GMT
You could, I imagine, but you'd only create more problems for yourself. The utc copy is used to prevent errored characters, which are potentially corrupt, from hitting your vault.
So you're getting normal operation, then strings of failures? On the same character, or on any character? The more details you provide up front, the faster this will go.
Thanks, Funky
|
|
|
Post by lucasmed on Jun 2, 2011 15:34:30 GMT
I get these normal operations, but the UTC is not converted to BIC and the character goes missing for the player. I did not get any error message though... Strange..
|
|
|
Post by lucasmed on Jun 2, 2011 15:51:46 GMT
and it happens on all characters...
|
|
|
Post by FunkySwerve on Jun 2, 2011 16:01:49 GMT
You're still not being very clear. You say 'I' - is this a problem other characters on the server are having, or is this just you, doing testing? If it's just you, make sure you don't have 'reset when empty' checked, or the server will reset before any leto edits can happen.
Funky
|
|
|
Post by pentagram666 on Jun 4, 2011 2:48:56 GMT
Funky, i'm lucasmed's friend and i discover what the problem is. In servers when players log with several diferent characters the newest bic can be other, not the character the player are trying to lvlup. So I modify the RealFile to this: "$RealFile = q<" + bicOplayer +">;" + When string bicOplayer = BicPath + GetBicFileName(oPC)+ ".bic";
I made this post for information prupose, I expect u see this and tell to others have the same problem.
[]'a
|
|
|
Post by FunkySwerve on Jun 4, 2011 7:43:39 GMT
That's not the proper fix. FindNewestBic DOES always get the latest bic. You simply need to ensure that the bic you're setting it to find is indeed the most recently modified, by doing an ExportSingle at an appropriate time. You CANNOT do that OnClientEnter, for example, as exports there do not work. This can be tricky, since Export, unlike all other NWN functions, does not block - there's no guarantee that it will finish by the time the next function in the script begins to execute. This is probably the oldest problem people encounter with letoscript, because they don't understand the operation of the blocking. Here's an old post on the topic: 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. In nearly all cases, a 6 second delay will suffice. Funky
|
|