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 
 
Question about NWNX! strings

 
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
Bodatoda



Joined: 23 Sep 2006
Posts: 4

PostPosted: Sat Sep 23, 2006 4:39    Post subject: Question about NWNX! strings Reply with quote

I have been using NWNX with my PW for some time now and I've decided that I need certain variables to be persistent through server reboots, module revisions, etc. Is that what adding NWNX! to my variable names is supposed to do?

For instance, if I make a localvar for completing a quest NWNX!quest_done instead of just quest_done, should this variable stick with the character through reboots, etc?

Will this work if all I have installed is the main NWNX executable? Do I need the ODBC plugin?

I actually did install the ODBC plugin and added NWNX! to some of my variables names to test and they don't stick through a reboot of the server.

Thanks for any help.
Back to top
View user's profile Send private message
xaltos



Joined: 03 Jun 2006
Posts: 31
Location: Germany

PostPosted: Sat Sep 23, 2006 7:56    Post subject: Reply with quote

You are on the wrong track.
NWNX is not working like this.

You can store with the ODBC plugin some data into a SQL Database.
But you need to setup a script that reads or writes the Data with SQL Commandos to the DB.


Here is a small example how this could look like.


Code:
 
...
    SQLExecDirect("SELECT area FROM areas;");
    iResult = SQLFetch();
    while (iResult == SQL_SUCCESS)
    {
        sArea = SQLGetData(1);
  ....  more code ....
        iResult = SQLFetch();
    }
...


Look into the aps_demo.mod for a full working example.

If you don't know SQL the syntax, can you use tools like "MySQL Query Browser". You can create full SQL commandos with this tools just with clicking.
Back to top
View user's profile Send private message
FunkySwerve



Joined: 02 Jun 2005
Posts: 377

PostPosted: Sun Sep 24, 2006 5:03    Post subject: Reply with quote

NWNX! strings are simply locals that different nwnx plugins look for and interact with. You need to try out the aps_demo mod, it demonstrates use of persistency functions, and has a full library of them, including get/setpersistentstring/int/float etc.
Funky
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion All times are GMT + 2 Hours
Page 1 of 1

 
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