Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-20-2007, 02:38 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
deletefile()?

It seems to be having problems deleting file(s) on the serverside.
The npc server has rights to them and I can successfully loadlines and savelines to/from the file(s) in question. I'm thinking maybe Stefan forgot to add support for this function when he added the npcserver rights security patch?

Anyone else experiencing such problems with this function?
__________________
Do it with a DON!
Reply With Quote
  #2  
Old 04-20-2007, 03:28 PM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
On Zodiac Dev, it works Ã* mervaille.
[ may not have security patch, however ]
Reply With Quote
  #3  
Old 04-20-2007, 06:38 PM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Instead of using load and savelines I would suggest load and save Vars. I'm not exactly sure if that would give you a different result but just something to try in case.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #4  
Old 04-20-2007, 07:54 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
Quote:
Originally Posted by killerogue View Post
Instead of using load and savelines I would suggest load and save Vars. I'm not exactly sure if that would give you a different result but just something to try in case.
Dude, were you just trying to give Zero advise? A USELESS advise even so? Tsk, tsk, shame on you.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #5  
Old 04-20-2007, 08:37 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
HTML Code:
  for (temp.levelData: this.toDelete)
  {
    if ((timevar2 - temp.levelData[1]) >= temp.levelData[2])
    {
      temp.filePath = "world/gsanddungeon/";
      temp.levelList.loadFolder("levels/" @ temp.filePath @ "*", 0);
      for (temp.currentLevel: temp.levelList)
      {
        if (temp.currentLevel.substring(12, 1) == temp.levelData[0])
        {
          echo("Deleted Level:" SPC temp.currentLevel);
          deleteFile(temp.currentLevel);
        }
      }
        
      //v_dungeons-cz3.nw
      this.toDelete.delete(this.toDelete.indices(temp.levelData));  
    }
  }
Yes, I have a problem with this! It should be deleting files, although it doesn't.
Reply With Quote
  #6  
Old 04-20-2007, 08:54 PM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
Quote:
Originally Posted by xXziroXx View Post
Dude, were you just trying to give Zero advise? A USELESS advise even so? Tsk, tsk, shame on you.
Hrm -- Maybe not quite.

I have been using loadVars and saveVars... But for some reason -- a while back -- when I used loadlines, the files that were saved using this didn't appear instantly onto the File Browser. With saveVars, it does. He may be onto something. I figured that saveVars called savelines; they may be two independent functions.

Zero -- Have you tried deleting it after you called /refreshfilelist ?
Reply With Quote
  #7  
Old 04-20-2007, 09:16 PM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by killerogue View Post
Instead of using load and savelines I would suggest load and save Vars. I'm not exactly sure if that would give you a different result but just something to try in case.
loadLines() and saveLines() are much diffrent then loadVars() and saveVars()
Reply With Quote
  #8  
Old 04-20-2007, 09:23 PM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Quote:
Originally Posted by xXziroXx View Post
Dude, were you just trying to give Zero advise? A USELESS advise even so? Tsk, tsk, shame on you.
He asked for opinions/advice. There's no need for you to jump down my throat because I'm trying to be helpful to him.

What's your issue?
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #9  
Old 04-20-2007, 11:30 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by killerogue View Post
He asked for opinions/advice. There's no need for you to jump down my throat because I'm trying to be helpful to him.

What's your issue?
It's because he's threatened.
Reply With Quote
  #10  
Old 04-20-2007, 11:36 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Well I agree this is right that loadvars/savevars may not have the file browser update issue as loadlines/savelines does but that isn't the concern here. I simply pointed out that loadlines/savelines works for the sake that we know the npc server has rights to modify the files. But if it makes you all happy, loadvars and savevars works as well

I usually don't even mind about the problem with savelines not displaying the file in the file browser...Hey, it still exists ^_^

EDIT:
Oh, forgot you post Novo.
I didn't do exactly that but I have tried it with files that are visible in the file borwser as well as files that aren't.

Quote:
Originally Posted by Chandler View Post
It's because he's threatened.
I think Ziro was just joking around actually o_o
__________________
Do it with a DON!
Reply With Quote
  #11  
Old 04-20-2007, 11:44 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by zokemon View Post
I think Ziro was just joking around actually o_o
I think not.
Reply With Quote
  #12  
Old 04-21-2007, 01:29 AM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
If it didn't work, my suggestion would be to use the RC command:

/reloadscriptlibs

Tell us if the problem persists.
Reply With Quote
  #13  
Old 04-21-2007, 01:51 AM
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
Quote:
Originally Posted by Chandler View Post
It's because he's threatened.
Why would I be threatened by someone I've helped to learn GS2? I was pointing out that instead of replying to Zero's question, he told him to use savevars instead of savelines, when it wasn't what Zero asked.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #14  
Old 04-21-2007, 02:04 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
'Twas a suggestion my dear man, a suggestion.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #15  
Old 04-21-2007, 02:35 AM
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
Quote:
Originally Posted by killerogue View Post
'Twas a suggestion my dear man, a suggestion.
Then come with better suggestions.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #16  
Old 04-21-2007, 02:36 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Quote:
Originally Posted by xXziroXx View Post
Then come with better suggestions.
ufirst
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #17  
Old 04-21-2007, 03:23 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Can you guys please just drop it...
Stan I thank you for the suggestion (even if it wasn't what I needed) and I appoligize for what Ziro said.
Ziro, thank you for trying to be my friend and defend me but you don't need to attack other people.

(Trying to say that the best way without coming out as a **** to either of my friends)
__________________
Do it with a DON!
Reply With Quote
  #18  
Old 04-21-2007, 03:33 AM
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
Quote:
Originally Posted by killerogue View Post
ufirst
Alright, I will.

Zero, in what folder is the files you are trying to delete? Because, deletefile() can't delete files in levels/ or any sub folders to it.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #19  
Old 04-21-2007, 03:36 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by xXziroXx View Post
Alright, I will.

Zero, in what folder is the files you are trying to delete? Because, deletefile() can't delete files in levels/ or any sub folders to it.
Oh really?
Well that is most likely the problem then. Bjorn made it levels/administration/
Sadly, he isn't online to fix that
__________________
Do it with a DON!
Reply With Quote
  #20  
Old 04-21-2007, 04:00 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Quote:
Originally Posted by xXziroXx View Post
Alright, I will.

Zero, in what folder is the files you are trying to delete? Because, deletefile() can't delete files in levels/ or any sub folders to it.
Isn't there a function to access and delete files in the levels structure tho? I coulda sworn I saw one....

Quote:
Originally Posted by zokemon View Post
Can you guys please just drop it...
Stan I thank you for the suggestion (even if it wasn't what I needed) and I appoligize for what Ziro said.
Ziro, thank you for trying to be my friend and defend me but you don't need to attack other people.

(Trying to say that the best way without coming out as a **** to either of my friends)
<3 :P But Ziro and I are friends as well.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #21  
Old 04-21-2007, 07:04 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
The function not being able to delete files within the levels/ folder is a nice security measure.

However, it should be a serveroption if it isn't already.

Also, the fact that this function was implemented before the NPCServer rights were indicates that the security measure is obsolete.
__________________
Reply With Quote
  #22  
Old 04-21-2007, 08:28 AM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by xXziroXx View Post
Then come with better suggestions.
I'll remember that next time you ask for assistance.
Reply With Quote
  #23  
Old 04-21-2007, 08:34 AM
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
Quote:
Originally Posted by Chandler View Post
I'll remember that next time you ask for assistance.
You do that.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #24  
Old 04-21-2007, 08:35 AM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by xXziroXx View Post
You do that.
I shall.
Reply With Quote
  #25  
Old 04-21-2007, 09:16 AM
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
Quote:
Originally Posted by Chandler View Post
I shall.
Good.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #26  
Old 04-21-2007, 02:32 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Argue over AIM if you must, stop spamming the thread with your asinine remarks.
__________________
Reply With Quote
  #27  
Old 04-22-2007, 06:07 PM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Stop derailing the thread.
Someone already mentioned if it was in the levels folder, this file.

May we see the line you are using to delete it?
__________________
Reply With Quote
  #28  
Old 04-25-2007, 10:13 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Kristi View Post
Stop derailing the thread.
Someone already mentioned if it was in the levels folder, this file.

May we see the line you are using to delete it?
Well, I tried it in a completely different script on my own server (where I can control what folder the file is in) and this proved to be true. You can't delete files from the levels/ folder. Thanks!
__________________
Do it with a DON!
Reply With Quote
  #29  
Old 04-25-2007, 10:20 AM
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
Quote:
Originally Posted by zokemon View Post
Well, I tried it in a completely different script on my own server (where I can control what folder the file is in) and this proved to be true. You can't delete files from the levels/ folder. Thanks!
You can now.. kinda.

http://forums.graalonline.com/forums...ad.php?t=73587
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #30  
Old 04-25-2007, 10:53 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by xXziroXx View Post
Ahh, looks like my work on GK did wonders!
__________________
Do it with a DON!
Reply With Quote
  #31  
Old 04-25-2007, 11:29 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by zokemon View Post
Ahh, looks like my work on GK did wonders!
You seem to mention your working on GK alot. But I'm sure I did too when I first worked there...
__________________
Reply With Quote
  #32  
Old 04-26-2007, 12:03 AM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
because we're tuff guys rite!!
o_o;;
Reply With Quote
  #33  
Old 04-26-2007, 03:27 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Inverness View Post
You seem to mention your working on GK alot. But I'm sure I did too when I first worked there...
I'm sure you did too, but you don't now! ^_^
__________________
Do it with a DON!
Reply With Quote
  #34  
Old 04-26-2007, 05:38 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by zokemon View Post
I'm sure you did too, but you don't now! ^_^
I got over it.
There were more important things to consider. However, I do wonder what happened to my half-finished levels for the Zormite Castle. HINT HINT
__________________
Reply With Quote
  #35  
Old 04-26-2007, 05:40 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
OH I MADE THE CURRENT ONES
I even did the tiles for them
SCRIPTER FOR LIFE
Reply With Quote
  #36  
Old 04-26-2007, 05:42 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Chandler View Post
OH I MADE THE CURRENT ONES
I even did the tiles for them
SCRIPTER FOR LIFE
It would help if you used quotes so people know exactly who you're responding to. And if you are responding to me, I remember that I had designed a long hallway with 3 areas branching off on each side, and all areas were usually a platform surrounded by a large amount of water.
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:00 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.