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 
 
Limit on SetPersistentLocations?

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



Joined: 10 Sep 2005
Posts: 11
Location: The Yawning Portal Tavern, Waterdeep

PostPosted: Tue Sep 13, 2005 23:11    Post subject: Limit on SetPersistentLocations? Reply with quote

I'm trying to set three different persistent locations on a PC - once per mintue (as per one of the threads below), on resting, and on death. I'm using different string sVarName variables (CurLoc, RestLoc and DiedLoc) but they don't seem to be saving properly. My syntax is:

SetPersistentLocation(oPC, CurLoc, lCurLoc) - this one works
SetPersistentLocation(oPC, RestLoc, lRestLoc) - can't get this one to work
SetPersistentLocation(oPC, DiedLoc, lDiedLoc) - haven't tried as above doesn't work

Is there a limit to how many times SetPersistentLocation can be set on a PC?
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
chris421



Joined: 07 Apr 2005
Posts: 53

PostPosted: Wed Sep 14, 2005 23:57    Post subject: Reply with quote

Shouldn't be. You're not using the same value name for each of the three rows in the database, right? So long as you're writing to and reading from unique values you're limited only by the size of the database in theory. I'm doing something very similar. I have a BIND loc and a LAST loc. BIND loc is stored by the player through an item/conversation. LAST loc is stored on a userdef Event every 5min and/or by the act of resting (the completion of resting). You can't really collect the logout loc reliably I've found because the player object is already gone. Typically doesn't matter if your server is up more often than not. The player's logout loc exists in server memory so when he rejoins he's back where he left off. Just increase how often you collect and store loc according to your needs.
Back to top
View user's profile Send private message
monezz



Joined: 03 Jan 2005
Posts: 52
Location: The Netherlands

PostPosted: Fri Sep 16, 2005 12:24    Post subject: Reply with quote

The problem will have something to do with the values assigned to the variables you use in the setPersistentLocation function call.
Write the values to the log so you see what goes wrong.
Back to top
View user's profile Send private message Visit poster's website
shadguy



Joined: 03 Jan 2005
Posts: 6
Location: Raleigh, NC

PostPosted: Sat Sep 17, 2005 21:04    Post subject: Reply with quote

Dreu Noctem saves on rest no problem. We use a number of save location persistent features - there shouldn't be a hard limit due to nwnx.

A couple things to realize:

1) the location is translated into a string for storage and then translated back for use.
2) the area is stored by tag - so all of your areas must have unique tags. If your tags are not unique, you may store unexpected locations.

Without knowing more about how it is failing, I can't tell you much more.

-d.
_________________
Dreu Noctem
Back to top
View user's profile Send private message Visit poster's website
Moonunit921



Joined: 10 Sep 2005
Posts: 11
Location: The Yawning Portal Tavern, Waterdeep

PostPosted: Sun Sep 18, 2005 13:39    Post subject: Reply with quote

Great, those hints helped me sort it out. Thanks folks!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
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