13 Mar, 2010, triskaledia wrote in the 1st comment:
Votes: 0
tables.c:942: warning: initialization makes integer from pointer without a cast
tables.c:942: error: initializer element is not computable at load time
tables.c:942: error: (near initialization for material_solid_table[9].materialname)

struct material_info
{
char materialname;
int armorboost;
};

const char material_info material_gem_table[] =
{
{"amber", 0},
{"aquamarine", 0},
{"diamond", 1},
{"emerald", 0},
{"glass", 0},
{"gold", 0},
{"opal", 0},
{"pearl", 0},
{"ruby", 0},
{"sapphire", 0},
{"skeletal", 0},
{"spinel", 0},
{"topaz", 0}
};

const char material_info material_solid_table[] =
{
{"leather", 0},
{"bronze", 0},
{"copper", 0},
{"iron", 0},
{"metal", 0},
{"mithril", 0},
{"glass", 0},
{"obsidian", 0},
{"platinum", 0},
{"titanium", 0}
};

I've been running back and forth in the code, trying to compare to see what it is that I'm doing wrong
to get these errors and that one warning, but I can't seem to pinpoint the problem. Looking at the other
arrays/tables designed inside of tables.c/const.c it appears that I have them down exactly how they've
been setup.
13 Mar, 2010, Davion wrote in the 2nd comment:
Votes: 0
You have to decare as char *!!

struct material_info
{
char *materialname;
int armorboost;
};


Without the '*' you're saying that it's just a single character. Where the * states it is a pointer.
13 Mar, 2010, Deimos wrote in the 3rd comment:
Votes: 0
Also, "material_info" is a struct, not a char:

const struct material_info material_gem_table[] = {}
const struct material_info material_solid_table[] = {}
0.0/3