09 Dec, 2009, Icecold211 wrote in the 1st comment:
Votes: 0
i am currently having issues with color appearing in the area's command, i was woundering if anyone else is having this issue or if they know how to stop this…
09 Dec, 2009, Koron wrote in the 2nd comment:
Votes: 0
I'm not sure what you mean. Maybe remove the color codes from your do_areas function?
09 Dec, 2009, Igabod wrote in the 3rd comment:
Votes: 0
or maybe the area name was typed in when it was created using color codes. try aset <areaname> <newname> and not use the color tags.
09 Dec, 2009, Davion wrote in the 4th comment:
Votes: 0
In ROM the area command uses {}'s to contain the area level IIRC. Just switch to a different character. [] perhaps :).
09 Dec, 2009, Igabod wrote in the 5th comment:
Votes: 0
oh yeah I forgot about that. I always change that first thing.
11 Dec, 2009, Icecold211 wrote in the 6th comment:
Votes: 0
thank you all for your quick responses i will try exactly what you said…
11 Dec, 2009, Icecold211 wrote in the 7th comment:
Votes: 0
void do_areas (CHAR_DATA * ch, char *argument)
{
char buf[MAX_STRING_LENGTH];
AREA_DATA *pArea1;
AREA_DATA *pArea2;
int iArea;
int iAreaHalf;

if (argument[0] != '\0')
{
send_to_char ("No argument is used with this command.\n\r", ch);
return;
}

iAreaHalf = (top_area + 1) / 2;
pArea1 = area_first;
pArea2 = area_first;
for (iArea = 0; iArea < iAreaHalf; iArea++)
pArea2 = pArea2->next;

for (iArea = 0; iArea < iAreaHalf; iArea++)
{
sprintf (buf, "%-39s%-39s\n\r",
pArea1->credits, (pArea2 != NULL) ? pArea2->credits : "");
send_to_char (buf, ch);
pArea1 = pArea1->next;
if (pArea2 != NULL)
pArea2 = pArea2->next;
}

return;
}


here's my area coding and im not seeing any issue with it…i see no reason why color should be put into the area's names…
11 Dec, 2009, Elervan wrote in the 8th comment:
Votes: 0
Did perhaps the areas names get colored when the builder made them? aedit a area that apparently has color and change the name of it to use default color and see if it clears up.
11 Dec, 2009, Mudder wrote in the 9th comment:
Votes: 0
You're looking in the wrong spot. You should be looking at the data that command shows you.

Name: [ 3] Midgaard
File: midgaard.are
Vnums: [3000-3399]
Age: [0]
Players: [1]
Security: [9]
Builders: [None]
Credits : [{ All } Diku Midgaard] <— See those { } ? Your color codes are triggered by the { symbol, aren't they?
Flags: [added]

Taken from the midgaard area file.

#AREADATA
Name Midgaard~
Builders None~
VNUMs 3000 3399
Credits { All } Diku Midgaard~
Security 9
End

What you would need to do is change the loading and saving to use something other than { }, or not at all. That would be pretty irritating really. I suggest instead changing the symbol for color codes. I like using the ` symbol, which is a ~, without the shift key.
11 Dec, 2009, Icecold211 wrote in the 10th comment:
Votes: 0
Mudder said:
You're looking in the wrong spot. You should be looking at the data that command shows you.

Name: [ 3] Midgaard
File: midgaard.are
Vnums: [3000-3399]
Age: [0]
Players: [1]
Security: [9]
Builders: [None]
Credits : [{ All } Diku Midgaard] <— See those { } ? Your color codes are triggered by the { symbol, aren't they?
Flags: [added]

Taken from the midgaard area file.

#AREADATA
Name Midgaard~
Builders None~
VNUMs 3000 3399
Credits { All } Diku Midgaard~
Security 9
End

What you would need to do is change the loading and saving to use something other than { }, or not at all. That would be pretty irritating really. I suggest instead changing the symbol for color codes. I like using the ` symbol, which is a ~, without the shift key.


i see what you are talking about and i found that is the exact problem, thank you guys for your assistance
11 Dec, 2009, Mudder wrote in the 11th comment:
Votes: 0
I just did a little checking. Turns out you can remove the { } from the area files without any issues. However you will have to continue removing the { } manually from every new area unless you change the OLC.
11 Dec, 2009, Icecold211 wrote in the 12th comment:
Votes: 0
Mudder said:
I just did a little checking. Turns out you can remove the { } from the area files without any issues. However you will have to continue removing the { } manually from every new area unless you change the OLC.


thanks for the info, so it looks like im going to have to change the OLC regardless *sighs*
11 Dec, 2009, JohnnyStarr wrote in the 13th comment:
Votes: 0
Did you miss Davion's post #4? lol
11 Dec, 2009, jurdendurden wrote in the 14th comment:
Votes: 0
Just realized I had this same problem, but fixed thanks to this post! :)
11 Dec, 2009, JohnnyStarr wrote in the 15th comment:
Votes: 0
I recommend using a Key system for areas if possible, much better, less conflicts.
If you have a ROM project, it should support both old area and new "key" areas already.
28 Jan, 2010, triskaledia wrote in the 16th comment:
Votes: 0
After reading this I ran through my code to look for an easier to answer than having to individually remove those pesky brackets one at a time. olc_save.c is where I found my code bit for the saving of the area credits information.
void save_area (AREA_DATA * pArea)
{
FILE *fp;

fclose (fpReserve);
if (!(fp = fopen (pArea->file_name, "w")))
{
bug ("Open_area: fopen", 0);
perror (pArea->file_name);
}

fprintf (fp, "#AREADATA\n");
fprintf (fp, "Name %s~\n", pArea->name);
fprintf (fp, "Builders %s~\n", fix_string (pArea->builders));
fprintf (fp, "VNUMs %d %d\n", pArea->min_vnum, pArea->max_vnum);
fprintf (fp, "Credits %s~\n", pArea->credits);
fprintf (fp, "Security %d\n", pArea->security);
fprintf (fp, "End\n\n\n\n");
etc etc etc etc
…………………………..
I'm not sure if you have the bracket saved into the credits printout, but I'd remove them from there and see if that helps. Doing that MIGHT cause a nasty crash trying to save it over, I'm not sure so you will want to backup your code if you do have the brackets in there and try to remove them.
28 Jan, 2010, Crelin wrote in the 17th comment:
Votes: 0
I could be wrong but I'm using ROM and it appears the {} brackets in the areas list aren't necesarrily hardcoded…meaning that the rom builders just chose to use those for their credits line, editing the old areas credit lines using OLC and changing them to something like [] works just fine, no need to change anything in your code as creating a new area starts you off with a (null) credit line anyways.
0.0/17