(no subject)

From: Glenn Campbell (glenn@ccgc.tc.gc.ca)
Date: 09/28/95


Heres a question for you Circle 3.0 gurus:

I am presently attempting to code a gain command on my mud, so mortals will
not gain automatically upon receiving x amt of xps. In attempting to code
this I entered the file limits.c and made some beggining changes to the
function gain_exp(). If I comment out the GET_LEVEL(ch) += 1; line the mud
works well until you strike a blow that would give you adequate experience
to advance a level. At that point the mud freezes (literally). 
 What I would like to do is, rather than have GET_LEVEL(ch)+=1, use a global
variable named credit that is boolean in nature. IF the mortal has
sufficient xps - set his credit=true, else stay at default of false. 
In examining the code I found that if I commented out the entire while
structure including the GET_LEVEL(ch)+=1; the code works fine and a mortals
xps simply goes negative. This while structure looks something like this:

while (GET_LEVEL(ch) < LVL_IMMORT-1)
{
GET_LEVEL(ch)+=1;
advance_level(ch);
... 

If anyone knows why the GET_LEVEL(ch)+=1 causes the mud to crash when
removed from the above while structure
I would be eternally grateful.

Temporarily Puzzled:
 ________________________________________________________________________(_) 
(_)  Glenn Campbell                   Voice:902-564-3660 (136)             |
| |  Computer Systems Specialist      Fax:902-562-6113                     |
| |  Canadian Coast Guard College     Voice Mail:902-565-6563 (20 seconds) |
| |________________________________________________________________________)
(_)



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