Re: [code][newbie] aedit format?

From: Ben Heise (sten2u@juno.com)
Date: 02/17/03


after playing with the socials a bit more, heres a new take...

the socials error is:

SYSERR: format error in social file near social '#'

heres the social made from aedit making a social ingame:
~doh doh 0 0 0 0
You smack $n on the forehead.
$N smacks $n on the forehead.
#
#
#
Smack who? where?
You smack yourself on the forehead. you dope!
#
#
#
#
#
$n smacks $sself on the forehead.


here's the code from where the error is given in act.social.c:

  /* now read 'em */
  for (;;) {
    fscanf(fl, " %s ", next_soc);
    if (*next_soc == '$')
      break;
    if (fscanf(fl, " %s %d %d %d %d \n",
                sorted, &hide, &min_char_pos, &min_pos, &min_lvl) != 5) {
      log("SYSERR: format error in social file near social '%s'", next_soc);
      exit(1);
    }
    /* read the stuff */
    curr_soc++;
    soc_mess_list[curr_soc].command = strdup(next_soc+1);
    soc_mess_list[curr_soc].sort_as = strdup(sorted);
    soc_mess_list[curr_soc].hide = hide;
    soc_mess_list[curr_soc].min_char_position = min_char_pos;
    soc_mess_list[curr_soc].min_victim_position = min_pos;
    soc_mess_list[curr_soc].min_level_char = min_lvl;


now somewhere in here, I screwed up... however like most of my screwups, I'll be hanged if I can find it. the reason I've concluded its in this portion of code is because, really this is (mostly) the only part of the code I dont understand.

help!? could anyone please explain what with this?

I've put up my codebase at musu.homelinux.org/musu1.3/

feel free to peruse it, and point out mistakes....

thanks,
ben



(musu.homelinux.org: 4000)

       Multi Users in a Star wars Universe

(coming soon to a network node near you)


________________________________________________________________
Sign Up for Juno Platinum Internet Access Today
Only $9.95 per month!
Visit www.juno.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/26/03 PDT