![]() |
Help With Savelines
How do i get savelines() to save in a specified folder.
PHP Code:
Current code: PHP Code:
|
You need to make sure the npc server has folder rights to w/e your saving to.
rw levels/folder/stuffs/* rw levels/sunnyville/mud/* |
I did
|
If it is saving the files to the scriptfiles folder, I'd say you didn't. Post your NPC-Server folder rights here.
|
NPC Code:rw levels/esteria/mud/* |
Quote:
Go in this order, and if it doesn't work, go down the line. If it works, stop. 1) Restart the npc-server /npcshutdown and /npcstart ... never use /npckill 2) Change the rights to rw levels/sunnyville/mud/*.ini ... sometimes this will fix it. (ALSO: There are some file types you can't save as, but I'm pretty sure .ini is okay ... did you try .txt or .arc?) 3) Try saving in a different folder to see if that works. 4) Get a global to restart the gserver ... this is a last resort, but usually fixes it. 5) Go cry a river. (just kidding) Also, this once fixed this for me ... change the 0 to false, so you have something like arr.saveLines( "dir/dir2/dir3/file.ini", false ); |
Well I don't really know that after the , does, can you tell me?
Edit: None of them worked, not even the "False", anyway. Haven't tried getting a global to restart gserver yet. But still can you tell me what after the , does? |
Quote:
true appends, false replaces. PHP Code:
PHP Code:
Generally you want to replace, but for logs, append. |
Yeah this is a mud so it's gonna replace.
But still, it won't work. And after I realised I've been changing the rights on npcserver instead of (npcserver) [lol :p] I tried again, now it's not working AT ALL, not even to scriptfiles/ |
Silly duck, you need an object to actually parse the information to an ini file. I.E. An inifile object maybe and inikeys? o_O
|
Ah nevermind guys. After I found out and told you guys that I used npcserver instead of (npcserver) and it wasn't working, when I tried deleting it (in prep for changing it all to sunnyville instead of the combined) i noticed they were hidden. Thanks for the halp :D (Yes, I mean to say halp, DO NOT QUESTION ME!)
Edit: New error The files always get hidden after being created in the folder it's supposed to go to. I always have to do /refreshfilelist to view them. Any suggestions? |
Quote:
I tend to get varying luck with this problem; sometimes it won't show them, but then the next few times after I refresh it may ... |
Ah ok, thanks Chris :D
Also, how would I create it's own folder (main folder, like levels/ is a main folder)? I gace the NPC Server rights to it, put it in folderconfig as "file mud/*.txt" etc.... but it won't show as a main folder... |
Quote:
Next, add it to yourself and place a file in it. Make sure it's added to the NPC-Server, and it should be working fine. |
Thanks :D
|
| All times are GMT +2. The time now is 12:17 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.