PenUltima Online

It is currently Sun Sep 07, 2008 1:51 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Errors saving game after account.Delete()
PostPosted: Sat Dec 16, 2006 6:44 am 
Offline

Joined: Sat Feb 04, 2006 6:26 pm
Posts: 549
I am getting the strangest errors with my shard after I delete an account.
(core version 096.4b)

I am doing much the same as the distro, deleting the characters, bankbox, datafile entry..... then I use acctref.Delete();

Then, because this is running from the pol www server, I then get a menu option to run a script that lists the inactive accounts again.

It works, the character and account are gone from accounts.txt and everywhere else.

But then, doing a world save, I get an error with one of the pol\data\*.txt files - seems a random thing. Here's a typical entry:

Unable to rename data/storage.txt to data/storage.bak: Permission denied (13)
Unable to rename data/storage.ndt to data/storage.txt: File exists (17)

And yes, I do have permissions to do it.

After some investigations it appears that the error is caused by running the inactive accounts script again, maybe too soon, which uses a lot of cycles to complete and does look around in the datafiles.

Is there some sort of extra cleanup or refresh I can do between deleting and listing again? I'd rather not get the savegame errors.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 16, 2006 8:51 am 
Is it possible you have a script running, with the save files open, while your world save starts? I think that could cause a 'permission denied' type of error, as well.


Top
  
 
 Post subject:
PostPosted: Sat Dec 16, 2006 1:05 pm 
Offline

Joined: Sat Feb 04, 2006 5:49 pm
Posts: 750
Location: Chicago, IL USA
What do you achieve looking around the data files that you cant get with the functions available to get props and members for everything in the world?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 16, 2006 3:04 pm 
Offline

Joined: Sat Feb 04, 2006 6:26 pm
Posts: 549
I am doing all this in pol, nothing external locks files etc.

The account and character deletion scripts are fine and have been used for years EXCEPT that I have just added the acctref.Delete(); line to it.
Yep, finally adding pol096 features to the shard :)

I think it's internal to POL. I'd like to know a bit more about the savegame function and why those 2 error messages come up - but that's all core internal. I'd like to script around it to prevent me from inadvertanly causing ist again. This might well effect other shards too whether you realise it or not. I am not blaming a core bug, just trying to avoid problems - after all any problem with saving the worldstate is serious to us all.

Scenario: you delete a character and account.
Almost immediately afterwards, you run a script that lists inactive accounts - this is normal enough, you are busy cleaning up the shard of old accounts.
The game's saver then saves the world state.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 16, 2006 4:11 pm 
Offline
POL Developer
User avatar

Joined: Sun Feb 12, 2006 9:50 pm
Posts: 836
Location: Indiana, USA
A: Is it still happening?
B: Have you tried doing this in a non-webserver script?

Austin's scripts would show you how to make the dynamically growing gump to do this ingame for easy testing also.

_________________
POL Developer - The Penguin Scripter


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl