View previous topic :: View next topic |
Author |
Message |
GodBeastX
Joined: 09 Aug 2006 Posts: 65
|
Posted: Fri Nov 10, 2006 18:02 Post subject: |
|
|
According to Obisidian, they are planning to put DB support in for the thanksgiving patch. It'll likely be a mirror of NWN1's crappy database support
Quick requestion, will the MySQL plugin support returned results instead of simply using the results of the last SQL call or is it too early to tell? |
|
Back to top |
|
|
yi
Joined: 17 May 2005 Posts: 12 Location: France
|
Posted: Sat Nov 11, 2006 11:28 Post subject: SQLGetData bug |
|
|
the SQLGetData bug is coming from a bug inside FindSubString.
It seems like FindSubString cannot support "¬"
demonstration :
in SQLGetDate :
you should have
Code: | iPos = FindSubString(sResultSet, "¬"); |
add behind
Code: | WriteTimestampedLogEntry(sResultSet);
WriteTimestampedLogEntry("iPos="+IntToString(iPos)); |
with a sResultSet like that "¬1¬¬226¬0"
I have in my log
so Papillon, could you try with another control code ? _________________ http://www.arkalym.com |
|
Back to top |
|
|
mostal
Joined: 29 Apr 2005 Posts: 60
|
Posted: Sat Nov 11, 2006 12:30 Post subject: |
|
|
not only this control code buggued, but all specail caracters with nwn2 function... |
|
Back to top |
|
|
amphiprion
Joined: 07 Nov 2006 Posts: 44 Location: Toulouse (France)
|
Posted: Sat Nov 11, 2006 13:20 Post subject: |
|
|
but with a code like that, FindSubString give the good result
string str = "a¬a";
SendMessageToPC(oPC, "find by 170:" + IntToString(FindSubString(str, "¬")));
result is 1 (OK)
string str = "a¤a";
SendMessageToPC(oPC, "find by :" + IntToString(FindSubString(str, "¤")));
result is 1 (OK)
but something strange occurs
string str = "a¬¤a";
SendMessageToPC(oPC, "find by 170:" + IntToString(FindSubString(str, "¬")));
SendMessageToPC(oPC, "find by :" + IntToString(FindSubString(str, "¤")));
result 1 OK and result 3 (KO) ??? |
|
Back to top |
|
|
Gryphyn
Joined: 20 Jan 2005 Posts: 431
|
Posted: Sat Nov 11, 2006 13:38 Post subject: Re: SQLGetData bug |
|
|
This will most likely be caused due to UNICODE support in NWN2.
I believe (from what I've read) the character set is UTF8 so anything over 127 is encoded to be multi-byte.
Possibly when the Source becomes available, someone can add the UNICODE support. My understanding is that the 'Interface' still requires a Byte Stream for locating the 'data'.
Strings will need to consider both length in bytes, and in characters.
In the interim pick an ASCII char less than 127.
Cheers
Gryphyn |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Sat Nov 11, 2006 16:02 Post subject: |
|
|
Good news. This problem has been addressed in Prototype 1.02.
Have a look at my news post. _________________ Papillon |
|
Back to top |
|
|
amphiprion
Joined: 07 Nov 2006 Posts: 44 Location: Toulouse (France)
|
Posted: Sat Nov 11, 2006 17:03 Post subject: |
|
|
Thanks papillon for your quick update |
|
Back to top |
|
|
yi
Joined: 17 May 2005 Posts: 12 Location: France
|
|
Back to top |
|
|
Urlord
Joined: 17 Nov 2006 Posts: 122
|
Posted: Fri Nov 17, 2006 15:43 Post subject: Maybe a Silly Question |
|
|
Maybe a silly question, but ya know, someone has to ask it!!!
Where do I download a copy of MySQL Lite? I have googled it and looked at MySQL.com and I find managers and extenders but not the actual application download.
I know I am getting old, but this is really scaring me!
EDIT - NEVER MIND. I was looking for MySQL Lite instead of SQLite. I found it.... DOH!!! _________________ Jim (aka, Urlord)
Visit the Persistent World of Nymri
Last edited by Urlord on Sat Nov 18, 2006 21:26; edited 1 time in total |
|
Back to top |
|
|
Urlord
Joined: 17 Nov 2006 Posts: 122
|
Posted: Fri Nov 17, 2006 22:59 Post subject: Version 1.03 working fine |
|
|
After being told that version 1.03 doesn't need an SQLInit(), it is all set up now.
I have tested the SQLExecDirect(), SQLFetch() and SQLGetData() functions. and they all seem to be working fine. I will continue to test and if I run into any problems I will post them here.
QUESTION: Will you be building the MySQL Plug-In for MySQL 5? I really hope so because I would like to make use of Stored Proceedures in MySQL 5.
Thanks again Papillion for all you hard work. _________________ Jim (aka, Urlord)
Visit the Persistent World of Nymri
Last edited by Urlord on Sat Nov 18, 2006 21:24; edited 1 time in total |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Sat Nov 18, 2006 2:11 Post subject: |
|
|
Ideally, I'd like one plugin that supports both MySQL versions. I had some troubles doing that with NWNX2, so it might no be possible... I haven't really looked into that.
If all else fails, there would have to be one MySQL plugin for each version.
Bottom line: Yes, MySQL 5 and 4 should be supported. _________________ Papillon |
|
Back to top |
|
|
Urlord
Joined: 17 Nov 2006 Posts: 122
|
Posted: Sat Nov 18, 2006 23:15 Post subject: |
|
|
One thing I have noticed is if you save your module as a true .mod file, NWNX-Controller will automatically loads the mod in NWServer. However, if you save your module as a Directory, it does not automatically load the module in NWServer.
Has anyone else noticed this behavior and is it expected? I typically tend to save my modules as Directories.
It's no big deal to manually load the module in NWServer, I was just curious as to if this was normal. _________________ Jim (aka, Urlord)
Visit the Persistent World of Nymri |
|
Back to top |
|
|
Urlord
Joined: 17 Nov 2006 Posts: 122
|
Posted: Mon Nov 20, 2006 19:54 Post subject: |
|
|
In my toolset, SQLStringToLocation and SQLStringToVector do not show up in the Script Assist listing. Any clue why this would be happening? _________________ Jim (aka, Urlord)
Visit the Persistent World of Nymri |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Mon Nov 20, 2006 23:06 Post subject: |
|
|
I'm not sure how the ScriptAssist window parses the function comments and I haven't really looked into that yet. If you could find out why, that would be appreciated (but please post any findings in a new thread, thanks!). _________________ Papillon |
|
Back to top |
|
|
Senalaya
Joined: 29 Dec 2004 Posts: 82 Location: Germany
|
Posted: Mon Nov 20, 2006 23:13 Post subject: |
|
|
The script assistant can't display nested includes.
So, if you have
my_inc
Code: | #include "SQL_include"
...
void MyFunction() |
my_script
Code: | #include "my_inc"
void main()
{
MyFunction();
} |
and are currently editing 'my_script', you will only see the 'MyFunction' in the list, but nothing from the 'SQL_include'. |
|
Back to top |
|
|
|