[newbie] another error with weapon spells with bpl21

From: Peter d (death_comes_to_all@hotmail.com)
Date: 06/29/02


I solved all the other errors that i described earlier..
and i can log in and edit a weapon, and add it's spells..
but when i reboot with my new weapon.. the mud crashes directly when it's
about to generate the objects..

i am pretty confident that the error is caused by this piece of code in
char *parse_object(FILE *obj_f, int nr)
in db.c, it says within comment lines that this is where the objects are
read from the obj files, and generates index and prototypes..
this is the block of code which i need help with..

case 'S':  /* Weapon Spells   Can pick a different letter if you used that.
*/
      if(!get_line(obj_f,line)) {
        log("SYSERR: Format error in 'S' field, %s.  Expecting numeric
constants, but file ended!",buf2);
           exit(1);
      }
      if((retval=sscanf(line, " %d %d %d ", t, t+1, t+2))!=3) {
        log("SYSERR: Format error in 'S' field, %s  expecting 3 numeric args,
got %d.  line: '%s'",buf2,retval,line);
           exit(1);
      }
      obj_proto[i].has_spells = TRUE;
      obj_proto[i].wpn_spells[wsplnum].spellnum=t[0];
      obj_proto[i].wpn_spells[wsplnum].level=t[1];
      obj_proto[i].wpn_spells[wsplnum].percent=t[2];
      wsplnum++;
      break;


what should i do with the wsplnum? i added an int at the top of the
function, like this..  int t[10], j, retval, wsplnum;
correct me :)

// Peter

_________________________________________________________________
MSN Hotmail är världens populäraste e-posttjänst. Skaffa dig ett eget konto
du också: http://www.hotmail.com

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT