Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Save Skills */
- for (i = 1; i <= SK_ARRAY_MAX; i++) {
- if (GET_SKILL(ch, i))
- fprintf(fl, "Skil: %d %d %d %d\n", i, GET_SKILL(ch, i), GET_SKILL_RANK(ch, i), GET_SKILL_XP(ch, i));
- }
- /**************************************/
- static void load_skills(FILE *fl, struct char_data *ch) {
- int num = 0, num2 = 0;
- char line[MAX_INPUT_LENGTH + 1];
- do {
- get_line(fl, line);
- sscanf(line, "%d %d %d %d", &num, &num2, &num3, &num4);
- if (num != 0) {
- GET_SKILL(ch, num) = num2; <----- This is the offending line
- GET_SKILL_RANK(ch, num) = num3;
- GET_SKILL_XP(ch, num) = num4;
- }
- } while (num != 0);
- }
- This is the error
- players.c:911: error: incompatible types when assigning to type âint[2]â from type âintâ
- Throwing in some more information here just in case it is needed
- this is the skil tag I have
- else if (!strcmp(tag, "Skil")) load_skills(fl, ch);
- This is the GET_SKILL define from utils.h
- #define GET_SKILL(ch, skill) (ch)->player.skills[skill]
- in the pfile if I open it before reloading up a character here is the line where it saves a skill
- kil: 1 33460988 10/0
Advertisement
Add Comment
Please, Sign In to add comment