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 
 
deletechar plugin - crashes server
Goto page Previous  1, 2
 
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
Energia



Joined: 05 Jun 2006
Posts: 19

PostPosted: Wed Sep 23, 2009 15:27    Post subject: Reply with quote

ShaDoOoW wrote:
Energia wrote:
today I tried in Windows XP.
And whats the result?


Same result. Sad
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Wed Sep 23, 2009 19:13    Post subject: Reply with quote

OMG I got it, can't understand I didn't saw that before. The file is indeed deleted but, when the player logs out the file is created again, you must first BootPC and after then, to be sure with some delay delete his file Smile
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Energia



Joined: 05 Jun 2006
Posts: 19

PostPosted: Thu Sep 24, 2009 18:33    Post subject: Reply with quote

Script is in previous page.
I used an ActionWait between Boot and Delete.
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Thu Sep 24, 2009 19:17    Post subject: Reply with quote

Well but FileDeleteFile is not action, you would have to transfer it with ActionDoCommand.

Try this:
Code:
#include "nwnx_files"
#include "nwnx_funzioni"

void delete_itself(string cname, string pname)
{
if (!FileDeleteFile(cname,pname)) SendMessageToAllDMs("ERROR: Il pg non e' stato cancellato");
}

void main()
{
object oPC = GetPCSpeaker();
string pname = "servervault/"+GetPCPlayerName(oPC);
string cname = GetBicFileName(oPC)+".bic";
DelayCommand(1.0,BootPC(oPC));
DelayCommand(3.0,delete_itself(cname,pname));
}

_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Energia



Joined: 05 Jun 2006
Posts: 19

PostPosted: Tue Oct 20, 2009 14:13    Post subject: Reply with quote

ShaDoOoW wrote:
Well but FileDeleteFile is not action, you would have to transfer it with ActionDoCommand.

Try this:


Works! Well done!
Thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion All times are GMT + 2 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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