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 
 
Alot of questions
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Database related
View previous topic :: View next topic  
Author Message
Acrodania



Joined: 02 Jan 2005
Posts: 208

PostPosted: Wed Nov 23, 2005 22:28    Post subject: Reply with quote

Please do what I mentioned the previous post and download the ZIP file in the link. In there is a FUNCITONAL SQLite Database file you can use.

A database file is NOT a text file; you cannot just edit a file and rename it!!!! Its special, what you did cannot work.

SQLite does NOT make the internal tables for you, you still have to do that via a call inside your module or externally with a utility. The APS_DEMO module gives an example of how that works.

After you download and copy the sqlite.db into your NWN directory and reset you INI file to use it, use NWNX to load the "aps_demo' modules. See if that works for you. If not post copies of the log files in your logs.0 directory so we can see what is going on......
Back to top
View user's profile Send private message
Peskyone



Joined: 04 Nov 2005
Posts: 27

PostPosted: Thu Nov 24, 2005 23:28    Post subject: Reply with quote

I did and i saw the file but I could not open it
Back to top
View user's profile Send private message Send e-mail
Peskyone



Joined: 04 Nov 2005
Posts: 27

PostPosted: Thu Nov 24, 2005 23:30    Post subject: Reply with quote

i will try the mod though...I am a bit confused at this point but i did download the file when you posted it and tried to look at sqlite/database file? which i belive is what you are talking about but could not view it and i do not know what application I need to do so.
Back to top
View user's profile Send private message Send e-mail
Peskyone



Joined: 04 Nov 2005
Posts: 27

PostPosted: Fri Nov 25, 2005 1:59    Post subject: Reply with quote

Alright I do really appreciate your patience as this is my first dealings with said system...Alright I decided on MYSQL I set NWNX by uncommenting...Now here is where I become confused I finally opened the example SQL database file but it was empty? Is it supposed to be? I was under the impression the date goes there...

So I sat and thought, I looked at the APS_demo. hard I truely did but I have no refrence base and no experience and the included read me...well I don't get it.

This is how I think it works Please Please correct me if I am wrong...

All the data is in the scripts and the example SQL database file now sitting in my NWN folder is just a storage temproray storage place when the actual script fires? Am I wrong? I really have no idea. I do truely thank you for your patience as I am trying to gain knowledge in exactly how this works.

I know I have asked three times how it links up...I apoligize i don't understand I am trying my best.

The script already tells the mod to look at a SQL file marked "teliport"

I tried using the SQL editor I made a sql script I put it in NWN and nothing...I am honestly confused.

Please Please could you start at the very basic begining? The read me..is assuming I have knowledge I don't.
Back to top
View user's profile Send private message Send e-mail
Peskyone



Joined: 04 Nov 2005
Posts: 27

PostPosted: Fri Nov 25, 2005 2:01    Post subject: Reply with quote

Please I do read your posts and try my best to do as you say I am at your mercy on this and thank you kindly.
Back to top
View user's profile Send private message Send e-mail
Peskyone



Joined: 04 Nov 2005
Posts: 27

PostPosted: Fri Nov 25, 2005 2:08    Post subject: Reply with quote

In addition i did try the mod more then once I am not sure what it is s'posed to do it says serveral speak strings and seems to make a sword armour and a scrol in one trunk and three sets of the same armour in another? I assume it is working correctly and most likely this is due to my inexperience.
Back to top
View user's profile Send private message Send e-mail
Peskyone



Joined: 04 Nov 2005
Posts: 27

PostPosted: Fri Nov 25, 2005 2:36    Post subject: Reply with quote

Here is where I am so far maybe you can tell me where I went wrong I realy really am sorry for being annoying I promise you I am making every effort to do as you say.

Alright first off in the module

I have this in the modload
#include "aps_include"
#include "x2_inc_switches"
#include "x2_inc_restsys"
void main()
{
SQLInit()

Of course I added the erf for aps so the include would point to something

Next I have this uncomment to point to using MYSQL
#include "md_teleport_sql" // Enables teleport functionality via MySQL/NWNASPX

This line is part of the teleport_inc that contains all the spells functionalites

if you need it I can post all of these scripts

next there is this line in md_teleport_sql pointing to the table

const string MD_TELEPORT_SQL_TABLE = "teleport"; // Table to retrieve teleport locations from


here is a script i finally got to compile I assumed i should label "teleport"



///with any luck this will create a table for the mod
#include "aps_include"
void main()
{

////////////////////////////////////////////////

SQLExecDirect("CREATE TABLE teleport (" +
"Id INTEGER( 10 ) PRIMARY KEY, [AUTOINCREMENT], " +
"Spoken CHAR( 20 ) NOT NULL DEFAULT '~'," +
"Target CHAR( 50 ) NOT NULL," +
"Familiarity CHAR( 20 ) NOT NULL," +
"FQHN CHAR( 255 ) NOT NULL DEFAULT 'localhost.localnet'," +
"Password CHAR(20) NOT NULL DEFAULT '~'," +
"Direction ENUM ( 'None', 'Both', 'In', 'Out' ) NOT NULL DEFAULT 'Both'," +
"Random ENUM ( 'None', 'Both', 'In', 'Out' ) NOT NULL DEFAULT ‘None',");
}

Now here is where I am unsure if I am making a mistake or not

This is what is conatined in a file called teleport. database

2DA V2.0

Spoken Target Familiarity FQHN Password Direction Random
0 farms Farms TP_FARMS localhost.localnet **** Both None
1 forest Forest TP_Forest localhost.localnet **** Both None

for my two areas

Now you said I can't just make a file and name it? It shows the same as the example sql.database exp...

This is in nwnx

; Use these five settings for MySQL connections
source = mysql
server = localhost
user = nwn <---what I chose when i set up msql
pwd = amy <---what i chose as a password when i did a walkthrough set up on the net.
db = teleport

MYSQL is reporting up and functional on internal mode

Please I am doing all I can to understand and I do appreciate all you have done but I don't understand I am not even sure how or why the APS example mod works though I am trying to learn.


I understand when you say the database is a special file and what i did won't work..so how do I do what will work? I feel terrribly inept and I am sorry for it. Sad

I am doing all I can to not waste your time.

Just explain where what goes and how if you could...where does the table go? From what is said before i think I have it right..inside the mod as i showed...if so is the database information the:

2DA V2.0

Spoken Target Familiarity FQHN Password Direction Random
0 farms Farms TP_FARMS localhost.localnet **** Both None
1 forest Forest TP_Forest localhost.localnet **** Both None

go externally or internally? If internally does it go with the table in the same script? If it doesn't go with the table in the same script do I need to label it specially so the table knows to look there? If they stay as two seperate internal scripts how do I make them 'talk" to each other I assume they would need to. Is there a command line I need to add to the table script?

If it goes external and I am wrong about the empty sql database example being a temporary storage sight how do I make it? I tried to recreate it with sql font and dbtools but the output was a msql script not a database file which only serves to further confound me even though i replicated it under "create database."

Of course every test of it i try I launch with nwnx2 and log in via gamespy
I am trying my best to figure it out without bothering anyone but I have no programing experience other then "sam's teach yourself C in 21 days"

I also apoligize for your inconveince and my post being so long I just hoped it would benefit to give as much info as possible.
Back to top
View user's profile Send private message Send e-mail
Acrodania



Joined: 02 Jan 2005
Posts: 208

PostPosted: Fri Nov 25, 2005 4:19    Post subject: Reply with quote

Smile Its ok! At least you are actively trying and on your own even Smile

I'm tied up with family stuff the next couple of days so I won't be able to further help for a little while (answering from my BlackBerry right now Razz ).

Look in your log files in your logs.0 directory and see what they tell you, they will tell you if there are any errors, etc happening...

Isthis something you downloaded? If so can you give us a link so we can look it over?
Back to top
View user's profile Send private message
Peskyone



Joined: 04 Nov 2005
Posts: 27

PostPosted: Mon Nov 28, 2005 12:49    Post subject: Reply with quote

sure can
Back to top
View user's profile Send private message Send e-mail
Peskyone



Joined: 04 Nov 2005
Posts: 27

PostPosted: Mon Nov 28, 2005 12:57    Post subject: Reply with quote

Here is the link to the teleport scripts by:Dennis van der Mark / Michel Stam / DaintyDelusiveDoll
I got off the vault.

http://nwvault.ign.com/View.php?view=Scripts.Detail&id=1636

This is the only problem I see though it was not in errors...

NWNX ODBC2 plugin V.0.9.2.4
(c) 2005 by Ingmar Stieger (Papillon) and Jeroen Broekhuizen
visit us at http://www.nwnx.org

o Logfile maximum size limit is: 524288 bytes
o Log level: Everything will be logged.
o Using MySQL connection.
o Hooking SCO....hooked at 5c65d0
o Hooking RCO....hooked at 5c64b0
! Error while connecting to database: Access denied for user: 'nwn@localhost' (Using password: YES)
o Got request: SELECT * FROM teleport WHERE Target = 'Area001' LIMIT 1;
! SQL Error: Access denied for user: 'nwn@localhost' (Using password: YES)
o Disconnecting from database.
Back to top
View user's profile Send private message Send e-mail
Peskyone



Joined: 04 Nov 2005
Posts: 27

PostPosted: Mon Nov 28, 2005 15:04    Post subject: Reply with quote

going to attempt to reset the password and redo the mod seems changing the area name still leves it labeled as area001 somehow..let you know if it works
Back to top
View user's profile Send private message Send e-mail
Peskyone



Joined: 04 Nov 2005
Posts: 27

PostPosted: Tue Nov 29, 2005 12:34    Post subject: Reply with quote

No...very strange the password I reset up in command prompt using the following:

delete from user where Host <> 'localhost' and User <> 'root';
delete from db;
update user set User='Amy', Password=password('ilv2ply[nwn]') where User='root';
flush privileges;
exit

won't even work to make a connection with MySQL font and when I use what they have for a connection which is:
user root
with no password in nwnx it still doesn't work...Possitive I am doing something wrong it won't connect either way
Back to top
View user's profile Send private message Send e-mail
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Tue Nov 29, 2005 14:40    Post subject: Reply with quote

It says Access denied for user: 'nwn@localhost', so you should set up a user called "nwn" with access privileges to the database you set up for nwnx and with access rights from localhost.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Peskyone



Joined: 04 Nov 2005
Posts: 27

PostPosted: Wed Nov 30, 2005 14:52    Post subject: Reply with quote

alright thanks i will give that a try!
Back to top
View user's profile Send private message Send e-mail
Peskyone



Joined: 04 Nov 2005
Posts: 27

PostPosted: Wed Nov 30, 2005 15:59    Post subject: Reply with quote

Well I tried I have a connection named nwn@localhost via MySqlfont but it won't allow me to make a database table..I must have screwed something up should i uninstall mysql and start from the begening? Can you suggest a good tutorial?

I had been following this one but I am not sure it's working for what I need.

http://www.analysisandsolutions.com/code/mybasic.htm
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Database related All times are GMT + 2 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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