The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Region.uid
Author Message
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #1
Region.uid
Hello, I'm doing some scripts relating to Regions, storing their UIDs on files, and noticed that every Region changes UID after a restart, is there a way it can be fixed? or does it have it's logic to work this way, i can do a workaround asigning tags when i run my script but... if a player always have same uid, why can't also regions?
08-20-2013 08:15 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: Region.uid
I think it happens because regions uid aren't "saved", so everytime you restart the server, sphere re-assign the uid to them.
08-20-2013 08:33 AM
Find all posts by this user Like Post Quote this message in a reply
Rattlehead
Master
**

Posts: 290
Likes Given: 3
Likes Received: 8 in 6 posts
Joined: Jun 2012
Reputation: 8



Post: #3
RE: Region.uid
its becus regions are created and assigned at server startup, unlike items and characters which are stored in save files, regions arent saved. therefore once the server is shutdown the regions cease to exist, when you load the server back up, the regions are made again and placed at their specified locations.

the only regions that are saved and retain their uids are multi regions, and then only becus they have an item associated with them which gets saved, the multi region will use the multi items uid as its region uid

i myself have been heavily scripting region related things and have noticed that tags you assign in the actual areadef will reset to whats been assigned in the areadef if they have been altered in game when you resync but not when u restart the server, tags that you place on a region in game that have not been defined in the areadef will not reset and will retain their information.

so if you are going to use tags on the actual regions keep this in mind.

[Image: matts_siggy.gif]
08-20-2013 08:39 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #4
RE: Region.uid
What I meant was if could be done to have always the same UID for each region, by adding a OptionFlag or whatever, but thinking more about it I don't really need it since I can use region.defname to identify them and some functions to get to wich I want. Anyways, thanks for help Smile
08-20-2013 04:32 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)