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 
 
Questions related to SetPersistent

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules
View previous topic :: View next topic  
Author Message
Lugoun



Joined: 18 May 2007
Posts: 36

PostPosted: Fri May 18, 2007 1:01    Post subject: Questions related to SetPersistent Reply with quote

I do have some questions related to SetPersistent (listing SetPersistentString function here):
void SetPersistentString(object oObject, string sVarName, string sValue, int iExpiration = 0, string sTable = "pwdata")

Question#1 - Looking at the code, it appears that any non-player object that you wish to set persitent data 'on' will be recorded in the DB based in part on its tag. Does that mean that any non-player objects with identical tags will also have the same persistent variable(s) data?

Question #2 - The functions give the scripter the option to set the sql table, and the default is "pwdata". If we try to write data to a table that does not already exist, will it be added to the db?
_________________
Lugoun
www.hotta-rpg.org
Back to top
View user's profile Send private message
FunkySwerve



Joined: 02 Jun 2005
Posts: 377

PostPosted: Mon May 28, 2007 23:00    Post subject: Reply with quote

1) Yes.

2) No.

You can make your own tables and write your own queries once you get comfortable with the system. You can look at the starter mod for the code to create a new table. My first new table was simply a renamed pwdata table with the same fields, until I got more comfortable and made tables suited to my needs.

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 -> Scripts and Modules 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