Re: [CODE] portal

From: Allan Grant (pheonix@iq-corp.com)
Date: 05/24/00


It looks like you've put too many }'s.
Please give the entire function though to figure out the exact problem.
Also, please space them the way you would in the code, it makes it much
easier to figure out parse errors such as this one.  If your mail client
automatically takes out spaces at the begining of lines put something to
indicate the line in front followed by two spaces.  For example, for the
first part of the code put it like:
466>  if (j->in_obj)
467>    obj_to_obj(jj, j->in_obj);
468>  else
469>    if (j->carried_by)
470>      obj_to_room(jj, j->carried_by->in_room);
471>    else
472>      if (j->in_room != NOWHERE)
473>        obj_to_room(jj, j->in_room);
474>      else
745>        core_dump();

Please resend it either to me or to the list (the entire function) and
I'll be able to tell you where exactly the mistake is.


Thanks,


Allan | Pheonix

Alan Dickinson wrote:
>
> Hello! I'm trying to implement the magic portal in my mud, but at the
> limits.c, something has made a knot... i'll show you the code and the error
> msg:
>
> ---- part of code (limit.c) ----
>
> if (j->in_obj)
>
> obj_to_obj(jj, j->in_obj);
>
> else if (j->carried_by)
>
> obj_to_room(jj, j->carried_by->in_room);
>
> else if (j->in_room != NOWHERE)
>
> obj_to_room(jj, j->in_room);
>
> else
>
> core_dump();
>
> }
>
> extract_obj(j)
>
> }
>
> }
>
> (PS: HERE IS THE LINE 478) }
>
> if (GET_OBJ_VNUM(j) == 31)
>
> {
>
> if (GET_OBJ_VAL(j,0) > 0)
>
> GET_OBJ_VAL(j,0)--;
>
> if (GET_OBJ_VAL(j,0) == 1)
>
> {
>
> act("$p comeca a sumir!", FALSE, i, 0, 0, TO_ROOM);
>
> act("$p comeca a sumir!", FALSE, i, 0, 0, TO_CHAR);
>
> }
>
> if (GET_OBJ_VAL(j,0) == 0)
>
> {
>
> act("$p some em uma nuvem de fumaca!", FALSE, i, 0, 0, TO_ROOM);
>
> act("$p some em uma nuvem de fumaca!", FALSE, i, 0, 0, TO_CHAR);
>
> extract_obj(j);
>
> }
>
> (PS: HERE IS THE LINE 501) }
> ------ end -----
>
> ----- the msg ----
> limits.c: In function `point_update':
> limits.c:478: parse error before `}'
> limits.c:501: parse error at the end of input
> ---- end -----
>
> please! help me! I really don't understand what is wrong!
>
> [ ]'s
> Alan
>
>      +------------------------------------------------------------+
>      | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>      |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
>      +------------------------------------------------------------+


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT