View previous topic :: View next topic |
Author |
Message |
redils
Joined: 13 Jan 2005 Posts: 27
|
Posted: Tue May 29, 2007 21:43 Post subject: |
|
|
The chat plugin doesn't work anymore with patch 1.06 |
|
Back to top |
|
|
seed
Joined: 01 Dec 2006 Posts: 44
|
Posted: Wed Jun 13, 2007 6:46 Post subject: |
|
|
Confirmed:
NWNX4 Chat Plugin V.0.3.2
(c) 2005-2006 by dumbo (dumbo@nm.ru)
(c) 2006-2007 by virusman (virusman@virusman.ru)
visit us at http://www.nwnx.org
ChatFunc found at 0x4322b0
RunScript NOT FOUND!
GetPCobjByOID found at 0x450ee0
* Hooking error.
Do we need to update to NWNX4 1.08 beta for this to work again? Will older dll's still work with 1.08? |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
|
Back to top |
|
|
seed
Joined: 01 Dec 2006 Posts: 44
|
Posted: Wed Jun 13, 2007 12:08 Post subject: |
|
|
Thanks Works Great. |
|
Back to top |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Sat Jun 16, 2007 10:34 Post subject: |
|
|
Hmm, running in debug mode I get the dreaded: "runtime check failure #0: the value of ESP was not properly saved across a function call" This occurs when invoking pRunScript. If I force it to step through that, it dies with an access violation.
The odd thing is that in Release mode (which I assume does not have the ESP 'safety check') the access violation exception does not seem to occur.
Thoughts/suggestions? _________________ Khalidine, a NWN2 persistent world
Looking for volunteers. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Sat Jun 16, 2007 11:01 Post subject: |
|
|
Debug builds don't like inline assembly. |
|
Back to top |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Sat Jun 16, 2007 11:21 Post subject: |
|
|
virusman wrote: | Debug builds don't like inline assembly. |
Heh; simple enough. thanks. Knowing that, I can at least work around it. _________________ Khalidine, a NWN2 persistent world
Looking for volunteers. |
|
Back to top |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Mon Jun 18, 2007 0:22 Post subject: |
|
|
I am finding that RunScript, invoked after a sendMessage call is made, does seem to crash the server occasionally. I'm not sure yet why, save that it's an access violation.
The call stack puts it inside of the crt via nwn2 memory manager dll (exact name escapes me at the moment), in funcion "write" IIRC. It seems to occur in RunScript when assigning scriptRun = 0, but since it's not a debug build I'm pretty sure that locatoin isn't accurate.
So far, the only consistency I have seen is that I am using sendmessage from inside the chat script, and that in turn is re-invoking the chat script. And during the reinvocation, the crash occurs. Perhaps 1 time in 20 it crashes? Hard to give an exact number though. _________________ Khalidine, a NWN2 persistent world
Looking for volunteers. |
|
Back to top |
|
|
Undertowe
Joined: 03 Jan 2005 Posts: 33
|
Posted: Thu Jun 28, 2007 12:18 Post subject: |
|
|
Hey guys, in the demo module by Grinning Fool (linked above), chat_script contains the following lines:
Code: | NWNXSetString("CHAT", "LOG", "", 0, sMsg+"\n");
NWNXSetString("CHAT", "LOG", "", 0, " *** "+sText+"\n"); |
Just looking at them, they seem to be trying to write to the xp_chat log file. But, they don't seem to be working. I don't see the text being written. How is this supposed to work?
I also tried the old-fashioned way, which didn't work either:
Code: | SetLocalString(oPC, "NWNX!CHAT!LOG", "Log this"); |
Did the log function break?
I'm using NWNX4 1.08 beta 2 and NWNX4 Chat 0.3.3.
Thanks! |
|
Back to top |
|
|
Undertowe
Joined: 03 Jan 2005 Posts: 33
|
Posted: Thu Jun 28, 2007 12:43 Post subject: |
|
|
Figured it out. The string to be logged is being passed to the wrong parameter of NWNXSetString(). The code above should be:
Code: | NWNXSetString("CHAT", "LOG", sMsg+"\n", 0, "");
NWNXSetString("CHAT", "LOG", " *** "+sText+"\n", 0, ""); |
|
|
Back to top |
|
|
Undertowe
Joined: 03 Jan 2005 Posts: 33
|
Posted: Fri Jul 06, 2007 11:24 Post subject: |
|
|
Using the DM client, I sent a tell to myself and got the following in the log:
Code: | o CHAT: mode=14, from_oID=7FFFFFFF, msg='yo', to_ID=00000000
lastMsg: 20 0yo
TEXT: '20 0yo' |
Using the following code, the value of nMode was 20.
Code: | string sText = NWNXGetString("CHAT", "TEXT", "", 0);
int nMode = StringToInt(GetStringLeft(sText, 2)); |
Why does the log say "mode=14" and the string parsing return 20? Am I not getting the mode from the string properly? Or is there a bug here?
Also, is there a way to disable the standard logging? |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Fri Jul 06, 2007 16:57 Post subject: |
|
|
0x14 = 20
Quote: | Also, is there a way to disable the standard logging? | I'm afraid no, since debuglevel setting is gone.. Maybe I'll add debuglevel in the next version. |
|
Back to top |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Sat Jul 07, 2007 4:03 Post subject: |
|
|
Undertowe wrote: | Figured it out. The string to be logged is being passed to the wrong parameter of NWNXSetString(). The code above should be:
Code: | NWNXSetString("CHAT", "LOG", sMsg+"\n", 0, "");
NWNXSetString("CHAT", "LOG", " *** "+sText+"\n", 0, ""); |
|
Thanks, nice catch _________________ Khalidine, a NWN2 persistent world
Looking for volunteers. |
|
Back to top |
|
|
Undertowe
Joined: 03 Jan 2005 Posts: 33
|
Posted: Tue Jul 10, 2007 10:17 Post subject: |
|
|
I recently flattened my machine and re-installed Windows. Before I did that, however, I made a backup of my NWNX4 folder. After installing NWN2 I copied it back in place. Same files, same configuration, etc.
Now, when I load NWNX4 I get the following in the log:
Code: | * Loading plugin xp_chat.dll: Error 14001. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. |
I thought I remembered solving this problem before by installing the Microsoft Visual C++ 2005 Redistributable Package. So I installed it again, rebooted, but I'm still getting that error in the log.
Any ideas? Is there some dependency I'm missing? Does xp_chat still work with the latest update of NWN2?
Virusman, my team would be very grateful if you did provide a way to turn off the standard logging. There are only a few things we need to log, and we will be archiving these files, so I'd rather just write-out the information we need in a more user-friendly format, and cut out all the standard verbosity. |
|
Back to top |
|
|
Undertowe
Joined: 03 Jan 2005 Posts: 33
|
Posted: Tue Jul 10, 2007 10:56 Post subject: |
|
|
Soon after posting I discovered a more recent version of the VC++ redistributable and installed that, and rebooted:
Microsoft Visual C++ 2005 SP1 Redistributable Package
Now, when I do NWNX4_Controller.exe -interactive I get a dialogue saying:
Code: | This application has failed to start because MADCHOOK.DLL was not found. Re-installing the application may fix this problem. |
And the log says:
Code: | * Loading plugin xp_chat.dll: Error 126. The specified module could not be found. |
And the console window says:
Code: | Error: DDE execute request failed: a request for a synchronous execute transaction has timed out.
Execute failed!
* Hook not installed or error during initialization |
But if I run NWNX4_GUI.exe, the message window says:
Code: | * Hook installed and initialized successfully |
I think I had this exact same problem before, but I can't for the life of me remember what I did to fix it. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|