Thread: File Deletion
View Single Post
  #10  
Old 05-23-2006, 05:50 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Ok, lets show a more detailed explanation on what im trying to do then. First, the script!


Note: not the actuall script, but I tried this and the file wont get deleted.

NPC Code:

function onActionServerSide()
{
if (params[0] == "deletefile") {
echo( "Deleting file...");
deletefile( "levels/items/Weapons/phantombane.txt");
}
}
//#CLIENTSIDE
function onCreated()
{
triggeraction( 0, 0, "serverside", name, "deletefile");
}




Then, lets /find the file on RC!


PHP Code:
/find phantombane.txt

......

items/Weapons/phantombane.txtdownloadable45 byte2006-05-21 18:44:57 

Ok, next step: lets add the NPC to myself and check if it gets deleted!


PHP Code:
xXziroXx loaded attributes of player xXziroXx
xXziroXx set attributes of player xXziroXx
Deleting file
... 

Ah, now the file should be deleted, right? But.. its still in the folders! Lets check with /find..


PHP Code:
/find phantombane.txt

......

items/Weapons/phantombane.txtdownloadable45 byte2006-05-21 18:45:31 


So, does anyone have a clue what im doing wrong if anything?
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote