logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Prototype download
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Development
View previous topic :: View next topic  
Author Message
GodBeastX



Joined: 09 Aug 2006
Posts: 65

PostPosted: Fri Nov 10, 2006 18:02    Post subject: Reply with quote

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 Smile

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
View user's profile Send private message
yi



Joined: 17 May 2005
Posts: 12
Location: France

PostPosted: Sat Nov 11, 2006 11:28    Post subject: SQLGetData bug Reply with quote

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 "12260"
I have in my log
Code:
12260
iPos=-1


so Papillon, could you try with another control code ?
_________________
http://www.arkalym.com
Back to top
View user's profile Send private message
mostal



Joined: 29 Apr 2005
Posts: 60

PostPosted: Sat Nov 11, 2006 12:30    Post subject: Reply with quote

not only this control code buggued, but all specail caracters with nwn2 function...
Back to top
View user's profile Send private message
amphiprion



Joined: 07 Nov 2006
Posts: 44
Location: Toulouse (France)

PostPosted: Sat Nov 11, 2006 13:20    Post subject: Reply with quote

but with a code like that, FindSubString give the good result

string str = "aa";
SendMessageToPC(oPC, "find by 170:" + IntToString(FindSubString(str, "")));
result is 1 (OK)


string str = "aa";
SendMessageToPC(oPC, "find by :" + IntToString(FindSubString(str, "")));
result is 1 (OK)

but something strange occurs
string str = "aa";
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
View user's profile Send private message
Gryphyn



Joined: 20 Jan 2005
Posts: 431

PostPosted: Sat Nov 11, 2006 13:38    Post subject: Re: SQLGetData bug Reply with quote

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
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1058
Location: Germany

PostPosted: Sat Nov 11, 2006 16:02    Post subject: Reply with quote

Good news. This problem has been addressed in Prototype 1.02.

Have a look at my news post.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
amphiprion



Joined: 07 Nov 2006
Posts: 44
Location: Toulouse (France)

PostPosted: Sat Nov 11, 2006 17:03    Post subject: Reply with quote

Thanks papillon for your quick update
Back to top
View user's profile Send private message
yi



Joined: 17 May 2005
Posts: 12
Location: France

PostPosted: Sat Nov 11, 2006 21:19    Post subject: Reply with quote

It works fine Papillon
_________________
http://www.arkalym.com
Back to top
View user's profile Send private message
Urlord



Joined: 17 Nov 2006
Posts: 122

PostPosted: Fri Nov 17, 2006 15:43    Post subject: Maybe a Silly Question Reply with quote

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
View user's profile Send private message Send e-mail
Urlord



Joined: 17 Nov 2006
Posts: 122

PostPosted: Fri Nov 17, 2006 22:59    Post subject: Version 1.03 working fine Reply with quote

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
View user's profile Send private message Send e-mail
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1058
Location: Germany

PostPosted: Sat Nov 18, 2006 2:11    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Urlord



Joined: 17 Nov 2006
Posts: 122

PostPosted: Sat Nov 18, 2006 23:15    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Urlord



Joined: 17 Nov 2006
Posts: 122

PostPosted: Mon Nov 20, 2006 19:54    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1058
Location: Germany

PostPosted: Mon Nov 20, 2006 23:06    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Senalaya



Joined: 29 Dec 2004
Posts: 82
Location: Germany

PostPosted: Mon Nov 20, 2006 23:13    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Development All times are GMT + 2 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
Jump to:  
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