Thats true I forgot about that number, but with modern computers you can add
to that array. Just multiply the last number by 2. I totaly forgot about
that, cause that was what my problem was.

----- Original Message ----- 
From: "Hiddukel" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, December 09, 2003 11:08 PM
Subject: RE: rlist


>
> Your problem is probably going to be a buffer overflow, in fact if you
check
> your logs you will probably notice that it tells you that you have a
buffer
> size > 16384 or some other such message.  If you check the add_buf
function
> you will notice that it expands the buffer to fit your needs, however
stock
> rom code will not expand past 16,384 bytes (I believe).  You could solve
> this by increasing the maximum allowed buffer size, or by limiting the
> number of rooms shown in rlist and having an argument to show the next *n*
> rooms.  IE: "rlist 400" might be used to show the 400th to the 400th + *n*
> vnums in the area that you are doing the rlist in.  Both methods of fixing
> this problem have their drawbacks.  Expanding the buffer has it's drawback
> in memory usage, while limiting number of rooms shown in rlist has a
> functional drawback.
>
> Please note that if you are running into this problem in the first place
you
> are probably using long vnums which were never intended by stock rom code,
> and this is a direct result of their use.  Stock rom wasn't designed for
> areas this large and it is quite likely that you will see this in other
> places besides rlist. Specifically any function in which add_buf is used
and
> the output can exceed 16384 bytes.  Extending the maximum allowed buffer
> size will alleviate most of these problems.
>
> Also note that if, as Davion said, your room name plus the vnum being
shown
> even comes close to the string length you have set for it, even with a
page
> size of 20 lines you are going to flood someone off, not to mention your
> buffer size is going to end up being extremely huge to accommodate that
much
> data.  A buf of MSL will undoubtedly be sufficient for the output you are
> dealing with here.
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Davion
> Kalhen
> Sent: Tuesday, December 09, 2003 9:43 PM
> To: [email protected]
> Subject: Re: rlist
>
> That char doesn't really matter unless the length of vnum, and
> pRoomIndex->name is greater than MSL + 5000. See, sprintf() snarfs buf
> everytime its called, which is why you don't need the "buf[0] = '\0' at
the
> begining of every loop. Infact, you don't really need it that large at
all.
> Your problem might be the size of the BUFFER * if anything. I also don't
see
> the reason for rlist having an argument. So one_argument()ing in there is
> pointless unless you intend it to have arguments for it. And I'm slightly
> confused here when you say it stops around the 639th vnum. Now, does that
> mean everything with a vnum greater than 639 doesn't show up, or if the
area
> has more than 639 rooms, the ones after that don't show?
>
> Davion
>
> >From: "Sarix" <[EMAIL PROTECTED]>
> >To: "Nicholas Hutzell" <[EMAIL PROTECTED]>, <[email protected]>
> >Subject: Re: rlist
> >Date: Tue, 9 Dec 2003 19:09:48 -0700
> >
> >Probably still isn't large enough, you could try like MSL * 4
> >----- Original Message -----
> >From: "Nicholas Hutzell" <[EMAIL PROTECTED]>
> >To: <[email protected]>
> >Sent: Tuesday, December 09, 2003 7:04 PM
> >Subject: rlist
> >
> >
> > > I am having a problem with rlist only showing 639 vnums total. I
> > > tried adding to the char buf to see if it would allow for the extra
> > > vnums being used but nothing seems to work after the 639 vnum. What
> > > i did was..
> > >
> > > REDIT (redit_rlist)
> > > {
> > >     ROOM_INDEX_DATA *pRoomIndex;
> > >     AREA_DATA *pArea;
> > >     char buf[MAX_STRING_LENGTH + 5000]; <--this
> > >     BUFFER *buf1;
> > >     char arg[MAX_INPUT_LENGTH];
> > >     bool found;
> > >     long vnum;
> > >     int col = 0;
> > >
> > >     one_argument (argument, arg);
> > >
> > >     pArea = ch->in_room->area;
> > >     buf1 = new_buf ();
> > > /*    buf1[0] = '\0'; */
> > >     found = FALSE;
> > >
> > >     for (vnum = pArea->min_vnum; vnum <=
> > > pArea->max_vnum; vnum++)
> > >     {
> > >         if ((pRoomIndex = get_room_index (vnum)))
> > >         {
> > >             found = TRUE;
> > >             sprintf (buf, "[%5ld] %-17.16s",
> > >                      vnum, capitalize (pRoomIndex->name));
> > >             add_buf (buf1, buf);
> > >             if (++col % 3 == 0)
> > >                 add_buf (buf1, "\n\r");
> > >         }
> > >     }
> > >
> > >     if (!found)
> > >     {
> > >         send_to_char ("Room(s) not found in this area.\n\r", ch);
> > >         return FALSE;
> > >     }
> > >
> > >     if (col % 3 != 0)
> > >         add_buf (buf1, "\n\r");
> > >
> > >     page_to_char (buf_string (buf1), ch);
> > >     free_buf (buf1);
> > >     return FALSE;
> > > }
> > >
> > >
> > > but that didnt seem to help any. Does anyone have any idea how to
> > > correct this problem?
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > New Yahoo! Photos - easier uploading and sharing.
> > > http://photos.yahoo.com/
> > >
> > > --
> > > ROM mailing list
> > > [email protected]
> > > http://www.rom.org/cgi-bin/mailman/listinfo/rom
> > >
> >
> >--
> >ROM mailing list
> >[email protected]
> >http://www.rom.org/cgi-bin/mailman/listinfo/rom
>
> _________________________________________________________________
> STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
>
http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn
> .com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca
>
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
>
>
> -- 
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
>


Reply via email to