Guyang Mao wrote:
>
> If this has been covered before, I'm sorry.
>
> I've downloaded the clan code from the snippets page. I've put in
> everything it calls for. But when I got to this point I got
> stumped... how can I change this call
The clan code by meddhi?
>
> - snip -
>
> load_char((player_table + j)->name, &chdata);
> if(chdata.player_specials_saved.clan==clan[i].id) {
> chdata.player_specials_saved.clan=0;
> chdata.player_specials_saved.clan_rank=0;
> save_char_file_u(chdata);
> }
>
> - snip -
>
> to use ascii-pfiles? I'm thinking along the lines of making saving
> into ascii file its separate function and just call the same function
> from both save_char and save_char_file_u ... do you guys have any
> better ideas? If so, please help!
>
Yes, I have transferred them over, but if this is from the other clan code
(non-meddhi)....
Anyways, here you go (note - the liscense to this code is given to everyone but
quinn, people who work for quinn, any mud that quinn works on, etc.) :
(at the beginning of the section that the save functions are in)
char savedletter;
(in the various save functions)
else {
* savedletter = (player_table + j)->name[0];
* (player_table + j)->name[0] = tolower((player_table + j)->name[0]);
load_char((player_table + j)->name, &chdata);
if(chdata.player_specials_saved.clan==clan[i].id) {
chdata.player_specials_saved.clan=0;
chdata.player_specials_saved.clan_rank=0;
save_char_file_u(chdata); }
* (player_table + j)->name[0] = savedletter;
}
}
(etc)
(note - the lines with *s have been added/changed)
There is a bug in this code somewhere, but it works in most functions. The only
function I have seen that had major problems is clan delete.
Fili
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST