Re: Problem...

From: George (greerga@DRAGON.HAM.MUOHIO.EDU)
Date: 08/07/97


On Thu, 7 Aug 1997, Sammy wrote:

>On Thu, 7 Aug 1997, George wrote:
>
>> On Wed, 6 Aug 1997, Fili wrote:
>>
>> >Any idea what causes this when someone drinks from a fountain?
>>
>> >852 sprintf(buf, "$n drinks %s from $p.", drinks[GET_OBJ_VAL(temp, 2)]);
>>
>> 'temp' is probably out of range.
>
>*shrug*  Without a little code it's hard to tell, but I'm assuming he
>hasn't completely butchered the drink code, and temp is a valid object
>found by checking the room and player's inventory for " fountain".

Actually, I said that wrong.

'temp' probably has an out of range variable: GET_OBJ_VAL(temp, 2)

It's probably going past the drinks[] array.  Like if GET_OBJ_VAL(temp, 2)
is 10 and your have 8 drinks[], you'll crash.

--
greerga@muohio.edu me@null.net | Genius may have its limitations, but stupidity
http://www.muohio.edu/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | 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/08/00 PST