View previous topic :: View next topic |
Author |
Message |
Moonunit921
Joined: 10 Sep 2005 Posts: 11 Location: The Yawning Portal Tavern, Waterdeep
|
Posted: Tue Sep 13, 2005 23:11 Post subject: Limit on SetPersistentLocations? |
|
|
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 |
|
|
chris421
Joined: 07 Apr 2005 Posts: 53
|
Posted: Wed Sep 14, 2005 23:57 Post subject: |
|
|
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 |
|
|
monezz
Joined: 03 Jan 2005 Posts: 52 Location: The Netherlands
|
Posted: Fri Sep 16, 2005 12:24 Post subject: |
|
|
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 |
|
|
shadguy
Joined: 03 Jan 2005 Posts: 6 Location: Raleigh, NC
|
Posted: Sat Sep 17, 2005 21:04 Post subject: |
|
|
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 |
|
|
Moonunit921
Joined: 10 Sep 2005 Posts: 11 Location: The Yawning Portal Tavern, Waterdeep
|
Posted: Sun Sep 18, 2005 13:39 Post subject: |
|
|
Great, those hints helped me sort it out. Thanks folks! |
|
Back to top |
|
|
|