Re: [CODE] half_chops

From: Andrew (object@alphalink.com.au)
Date: 12/03/98


>  else {
>    newquest = atoi(buf);
>    if (newquest > 0) {
>      GET_QPOINTS(victim) == GET_QPOINTS(victim) + newquest;
                           ^^
Put '=' here, instead of '=='. '=' means place the value of the right term
into the left,
and '==' means 'if GET_QPOINTS(victim) is equal to GET_QPOINTS(victim) +
newquest then do',
which is impossible. So the line should look like:

GET_QPOINTS(victim) = GET_QPOINTS(victim) + newquest;

>      send_to_char(buf1, victim);
>    } else {
>      GET_QPOINTS(victim) == GET_QPOINTS(victim) - newquest;
                           ^^
Same thing here.

>Me thinks there's prolly something *very* simplistic I'm missing, but I
>can't see it.  Can anyone assist/point me in the right direction?

Aye, it is fairly simple now that you see it :) No matter, simple and common
mistake.
Just watch your '==' and '='s. If you have any moretrouble, feel free to
email me
personally.

-- Andrew.

| Andrew Ritchie, object@alphalink.com.au.


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



This archive was generated by hypermail 2b30 : 12/15/00 PST