mystickdreamer

Untitled

Dec 11th, 2014
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* Save Skills */
  2.     for (i = 1; i <= SK_ARRAY_MAX; i++) {
  3.         if (GET_SKILL(ch, i))
  4.             fprintf(fl, "Skil: %d %d %d %d\n", i, GET_SKILL(ch, i), GET_SKILL_RANK(ch, i), GET_SKILL_XP(ch, i));
  5.     }
  6.  
  7.  
  8. /**************************************/
  9.  
  10.  
  11. static void load_skills(FILE *fl, struct char_data *ch) {
  12.   int num = 0, num2 = 0;
  13.   char line[MAX_INPUT_LENGTH + 1];
  14.  
  15.   do {
  16.     get_line(fl, line);
  17.     sscanf(line, "%d %d %d %d", &num, &num2, &num3, &num4);
  18.     if (num != 0) {
  19.       GET_SKILL(ch, num) = num2;  <----- This is the offending line
  20.       GET_SKILL_RANK(ch, num) = num3;
  21.       GET_SKILL_XP(ch, num) = num4;
  22.     }
  23.   } while (num != 0);
  24. }
  25.  
  26.  
  27. This is the error
  28. players.c:911: error: incompatible types when assigning to type âint[2]â from type âintâ
  29.  
  30.  
  31.  
  32. Throwing in some more information here just in case it is needed
  33.  
  34. this is the skil tag I have
  35.  
  36. else if (!strcmp(tag, "Skil")) load_skills(fl, ch);
  37.  
  38.  
  39.  
  40.  
  41. This is the GET_SKILL define from utils.h
  42.  
  43. #define GET_SKILL(ch, skill)            (ch)->player.skills[skill]
  44.  
  45.  
  46. in the pfile if I open it before reloading up a character here is the line where it saves a skill
  47. kil: 1 33460988 10/0
Advertisement
Add Comment
Please, Sign In to add comment