Re: Race problem

From: Peter Ajamian (pajamian@cheapsam.com)
Date: 12/29/99


James Cress wrote:
>
> What I am trying to do is implement races.  I removed the entire block
> of code pertaining to races and put it in line by line.  After
> compiling each line I was able to narrow the problem down to this line
> of code:
>
> if (GETPFILEPOS(d->character) < 0)
>         GETPFILEPOS(d->character) =
> create_entry(GET_NAME(d->character);
>
> To give you a clearer picture, the code is from:
> http://developer.circlemud.org/documentation/wtfaq/race.shtml
>
> What came up as the error was the '=' sign.  The message read:
>
> interpreter.c(1514) : error C2106: '=' : left operand must be l-value

I'm assuming that the missing ")" on the second line is just a typo from
when you copied the line to the email, if not, that is one problem.

What the error message is telling you is that you cannot make an
assignment to GETPFILEPOS(d->character) (it is not an "l-value").

What is the #define for GETPFILEPOS?  Also, what is this line of code
trying to do?  You may have to come up with a different way of doing it
(depends on what the #define is).

Regards, Peter


     +------------------------------------------------------------+
     | 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 : 12/15/00 PST