Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ File Accessing

File Accessing

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Rynok   USA  (25 posts)  Bio
Date Sat 22 Jul 2006 02:02 PM (UTC)
Message
Any reason why Mushclient can't find any files for reading/writing?
Here is an error I get:
cannot read DataManip.lua: No such file or directory
stack traceback:
[C]: in function `dofile'
[string "Script file"]:2: in main chunk

I also took out the dofile() and I put the code directly into my main script, but then I tryed to run it and it said it could not get one of my text files that had all the data in it (another could not read error). Apparently it is having trouble reading the data, but I'm not sure why.
Top

Posted by Rynok   USA  (25 posts)  Bio
Date Reply #1 on Sat 22 Jul 2006 02:27 PM (UTC)
Message
Ok, I figured it out. As it turns out, you have to have your script (and all other files) in the same folder as you have your world file (WorldFile.Mcl)
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #2 on Sat 22 Jul 2006 10:18 PM (UTC)
Message
Doing a dofile without a path is going to take whatever the current directory is.

I would use GetInfo (59) to find the script file path, and prepend that to the file name. Or, at least hard-code a pathname in.

http://www.gammon.com.au/scripts/doc.php?function=GetInfo

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Rynok   USA  (25 posts)  Bio
Date Reply #3 on Sun 23 Jul 2006 12:42 AM (UTC)
Message
Yep, they were in the default directory so it should of worked. I figured out what the problem was. At first I thought it was the location of the world file. As it really turns out, it has to do with the plugins you use. I added the ColourNote plugin and it gave me those errors like the files didn't exist, and a simple reloading of the script CTRL+SHIFT+R didn't work. I went to the control itself, told it which script to run, said "OK" and it worked after that.

Not sure why it was having trouble due to an added plugin, but that seems to be the problem, although repointing to the script fixed it.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #4 on Sun 23 Jul 2006 12:50 AM (UTC)
Message
I'm pretty sure there was a post about that recently, but can't find it.

It is something to do with the default plugins directory. You could try setting global preferences to point the plugins directory to the right place, although it sounds like you have solved it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Rynok   USA  (25 posts)  Bio
Date Reply #5 on Mon 24 Jul 2006 01:20 PM (UTC)
Message
Where would I access the default plugin directories under global preferences? (in case I wanted to use a plugin)

I looked for it under the different tabs but didn't see anything on it.

Thanks
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #6 on Mon 24 Jul 2006 09:19 PM (UTC)
Message
Global Preferences -> Plugins -> Plugins Directory (near the bottom of the dialog).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


19,363 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.