On Thursday 20 December 2001 15:17, someone wrote:
> > Hi, I have found out that my mud is hanging on this line:
> > char skill_list[LEVEL_HERO][MAX_STRING_LENGTH];
>

I'm replying to a reply here as I don't have the original message, my 
apologies.

One thing to note is that with the above array, you are making 
MAX_STRING_LENGTH copies of a char array LEVEL_HERO characters long.

So, assuming LEVEL_HERO is 100 and MAX_STRING_LENGTH is 2048, you're 
essentially making 2048 strings that are 100 characters long. Is this what 
you really want? It seems like

char skill_list[MAX_STRING_LENGTH][LEVEL_HERO];

would make more sense for most things (100 strings that are 2048 characters 
long).

Just something I noticed. :)

-- 
Bobby "Chil" Bailey           | "The only source of knowledge is
Coders' Forum Moderator       |  experience."  -- Albert Einstein
Coder's Repository Admin      | Dark Saghani! http://saghani.com
http://www.kyndig.com/        | #Rom on IRC! irc.acestar.org:6667
Welcome To Your New Addiction | PGP Keys: http://chil.kyndig.com/pgp

Reply via email to