I am having issues with copying strings into null values
i have this struct:
and stuck it inside struct pc_data
when i try to copy something into it
i get this in game bug message:
Log: [*****] BUG: mudstrlcpy: NULL dst string being passed!
comparison note:
if i try to print out ch->pcdata->atlas[0] then it just prings "NULL"
but if I create a new char array within a local function and print it without initializing it or assigning any values it just prints blank.
So my question I guess is How do I come about getting the atlas values to not be null so I can use string copy functions?
i have this struct:
struct map
{
char *area;
};
and stuck it inside struct pc_data
map atlas[MAX_MAPS];
when i try to copy something into it
mudstrlcpy( ch->pcdata->atlas[0].area, afile, MAX_STRING_LENGTH );
i get this in game bug message:
Log: [*****] BUG: mudstrlcpy: NULL dst string being passed!
comparison note:
if i try to print out ch->pcdata->atlas[0] then it just prings "NULL"
but if I create a new char array within a local function and print it without initializing it or assigning any values it just prints blank.
So my question I guess is How do I come about getting the atlas values to not be null so I can use string copy functions?