Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // define for the load_skills switch
- #define LOAD_SKILL 0
- /* local functions */
- static void load_skills(struct char_data *ch, const char *line, int mode);//(FILE *fl, struct char_data *ch);
- under load_char:
- /* Character initializations. Necessary to keep some things straight. */
- ch->affected = NULL;
- for (i = 1; i <= SK_ARRAY_MAX; i++) {
- SET_SKILL(ch, i, 0);
- }
- case 'S':
- if (!strcmp(tag, "Sex ")) GET_SEX(ch) = atoi(line);
- else if (!strcmp(tag, "ScrW")) GET_SCREEN_WIDTH(ch) = atoi(line);
- else if (!strcmp(tag, "Skil"))load_skills(ch, line, LOAD_SKILL);
- static void load_skills (struct char_data *ch, const char *line, int mode) {//(FILE *fl, struct char_data *ch) {
- int num = 0, num2 = 0, i;
- sscanf(line, "%d/%d", &num, &num2);
- sscanf(line, "%d/%d", GET_SKILL_RANK(ch, i), GET_SKILL_XP(ch, i))
- switch (mode) {
- case LOAD_SKILL:
- GET_SKILL_RANK(ch, i) = num;
- GET_SKILL_XP(ch, i) = num2;
- break;
- }
- /*
- do {
- get_line(fl, line);
- sscanf(line, "%d %d %d", &num, &num2, &num3);
- if (num != 0)
- SET_SKILL(ch, num, num2, num3);
- } while (num != 0); */
- }
- here is what is in save_char
- /* Save skills */
- //if (GET_ADMLEVEL(ch) < ADMLVL_IMMORT) {
- for (i = 1; i <= SK_ARRAY_MAX; i++) {
- if (GET_SKILL_RANK(ch, i))
- fprintf(fl, "Skil: %d/%d\n", GET_SKILL_RANK(ch, i), GET_SKILL_XP(ch, i));
- }
Advertisement
Add Comment
Please, Sign In to add comment