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
➜ Area Editor
➜ General
➜ New Area flag #HIDDEN
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Lywellyn
USA (15 posts) Bio
|
Date
| Mon 09 Jan 2006 04:57 AM (UTC) |
Message
| I coded in a new area header #HIDDEN for my areas, and when Area Editor tries to load them, it won't load it since it doesn't recognize it. Is there something that can be done about this? Either adding a new feature to the configuration file? Or if it runs into a header it doesn't recognize, it may show an error, but it doesn't stop the process of loading the file?
I don't really want to have to take the header completely out, as it's useful for my MUD.
Thank you. | Top |
|
Posted by
| Nick Gammon
Australia (23,132 posts) Bio
Forum Administrator |
Date
| Reply #1 on Mon 09 Jan 2006 06:27 AM (UTC) |
Message
| I think this came up a while ago. It is hard to support custom area file formats, because of the difficulty of specifying what might follow the header.
All I can suggest is some sort of "pre-processing" where you strip out the #HIDDEN flag prior to editing, and put it back afterwards. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Lywellyn
USA (15 posts) Bio
|
Date
| Reply #2 on Mon 09 Jan 2006 06:30 AM (UTC) |
Message
| Pre-processing would work, but it could become tedious. Isn't there a way to make it so that it will show the error, but skip it and load the rest of the area file it *does* recognize? | Top |
|
Posted by
| Nick Gammon
Australia (23,132 posts) Bio
Forum Administrator |
Date
| Reply #3 on Mon 09 Jan 2006 06:40 AM (UTC) |
Message
| But then what? It ignores the part it doesn't recognise, so it doesn't get written out, so it is dropped from the file. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Lywellyn
USA (15 posts) Bio
|
Date
| Reply #4 on Mon 09 Jan 2006 06:55 AM (UTC) |
Message
| Erm....temporarily write the unknown parts to a temp file, then write those parts when you save? *shrug*
Just trying to present an idea. :) | Top |
|
Posted by
| Nick Gammon
Australia (23,132 posts) Bio
Forum Administrator |
Date
| Reply #5 on Mon 09 Jan 2006 09:49 PM (UTC) |
Message
| Well, you could write a small script (eg. in Lua) to do that. Can you post the format of your #HIDDEN flag, with a few lines before and after it, so I can see the context, and let me think about it. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Lywellyn
USA (15 posts) Bio
|
Date
| Reply #6 on Mon 09 Jan 2006 11:41 PM (UTC) |
Message
| It's simply this:
#AREA The Noble Academy of Knowledge~
#VERSION 1
#HIDDEN 0
#AUTHOR Delynn~
#RANGES
0 10 0 10
$
Where the value after hidden is 0 if the area is not hidden to mortals, or 1 if it is. | Top |
|
Posted by
| Nick Gammon
Australia (23,132 posts) Bio
Forum Administrator |
Date
| Reply #7 on Wed 11 Jan 2006 01:50 AM (UTC) |
Message
| I think there is a simple solution to this that doesn't require changes to the Area Editor, and still let you keep your flag.
Rather than adding a new field to the area file, and thus making it incompatible with this (and other) area editors, simply slip the flag in a different way.
For example, if the first character of the area name is a hyphen it could be a hidden area.
#AREA -The Noble Academy of Knowledge~
Then when you load an area you could do something like this:
if (tarea->name [0] == '-')
tarea->hidden = true;
That way the area file is still readable by the area editor and to set the "hidden" flag you just add a hyphen to the area name.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Lywellyn
USA (15 posts) Bio
|
Date
| Reply #8 on Wed 11 Jan 2006 06:18 AM (UTC) |
Message
| Ooh, good idea :D Thank you! | 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.
21,253 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top