18 May, 2010, Xrakisis wrote in the 1st comment:
Votes: 0
Hi im trying to add Cdeposit and Cwithdraw to my Rom

clan.c: In function 'do_cdeposit':
clan.c:730: warning: implicit declaration of function 'atoi'
clan.c:746: warning: implicit declaration of function 'do_info'
clan.c:751: error: assignment of read-only location 'clan_table[(int)ch->clan]'
clan.c:755: warning: implicit declaration of function 'save_kingdoms'
clan.c:719: warning: unused variable 'clan'


ch->gold -= amt;
clan_table[ch->clan].gold += amt;


struct clan_type
{
char * name; /* name */
char * who_name; /* who entry */
char * god; /* sacrifice god */
sh_int deathroom; /* death-transfer room */
sh_int recall; /* recall room */
bool independent; /* true for loners */
sh_int min_level; /* min level to petition*/
int gold; /* Clan Treasury - Xrak */
};


const struct clan_type clan_table[MAX_CLAN] =
{
/* independent should be FALSE if is a real clan */
/* name, who entry, deathroom, recall, indep't min level */
{"", "{c[ {c]", "{RJeremias{x", ROOM_VNUM_MORGUE, ROOM_VNUM_TEMPLE, TRUE, 0},
{"Loner", "{c[{w LONER {c]", "{RJeremias{x", ROOM_VNUM_MORGUE, ROOM_VNUM_TEMPLE, TRUE, 6},
{"Outcast", "{c[{wOUTCAST{c]", "{RJeremias{x", ROOM_VNUM_MORGUE, ROOM_VNUM_TEMPLE, TRUE, 10},
{"Ruler", "{c[ {YRULER{c ]", "Dekari", ROOM_VNUM_MORGUE, ROOM_VNUM_TEMPLE, FALSE, 20},
{"Lycan", "{c[{W LYCAN {c]", "Xrakisis", ROOM_VNUM_MORGUE, ROOM_VNUM_TEMPLE, FALSE, 2},
{"Death", "{c[{w DEATH {c]", "Pancho", ROOM_VNUM_MORGUE, ROOM_VNUM_TEMPLE, FALSE, 20},
{"Hades", "{c[{G HADES {c]", "{GXkandruss{x", ROOM_VNUM_MORGUE, ROOM_VNUM_TEMPLE, FALSE, 20},
{"Viper", "{c[{w VIPER {c]", "Anaconda", ROOM_VNUM_MORGUE, ROOM_VNUM_TEMPLE, FALSE, 20},
{"Light", "{c[{w LIGHT {c]", "Lighty", ROOM_VNUM_MORGUE, ROOM_VNUM_TEMPLE, FALSE, 20},
{"Demon", "{c[{R DEMON {c]", "{RXrakisis{x", ROOM_VNUM_MORGUE, ROOM_VNUM_TEMPLE, FALSE, LEVEL_IMMORTAL}
};
19 May, 2010, Zeno wrote in the 2nd comment:
Votes: 0
What is line 751?

What data type is ch->clan?
19 May, 2010, Xrakisis wrote in the 3rd comment:
Votes: 0
line 751 clan_table[ch->clan].gold += amt;

char_data
sh_int clan;
19 May, 2010, Zeno wrote in the 4th comment:
Votes: 0
Well the clan struct is a const, which means it can't be changed at runtime.
19 May, 2010, Xrakisis wrote in the 5th comment:
Votes: 0
thanks… i wasnt seeing the const… got it to compile now.
0.0/5