Re: [CODE] half_chops

From: Dan Egli (
Date: 12/03/98

On Thu, 3 Dec 1998, Julian Buckley wrote:

> Hi List...
>     if (newquest > 0) {
>       GET_QPOINTS(victim) == GET_QPOINTS(victim) + newquest;

>       GET_QPOINTS(victim) == GET_QPOINTS(victim) - newquest;

Only things I see off hand, are these. I DOUBT that they will be your
cause, but since this is C, let us use the shortest possible form.

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

As I said, probably not your cause, but a nice little item :>

One thing you may want to do is add debuging log statements througout the

like just before the points are added/subtracted, call a log line, like:
sprintf(buf1, "DEBUG: calling the GET_QPOINTS() macro to add %s points", newpoints);

then AFTER, do:
log("DEBUG: call to GET_QPOINTS() complete.");

That way you can make sure that the routines are actually getting called!
I found a logic error that way.

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

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