View Single Post
Old 12-05-2012, 10:51 AM   #3
ww_crimson
Member
 
Join Date: Sep 2011
Home MUD: Aarchon
Posts: 62
ww_crimson is on a distinguished road
Re: Really struggling with qsort (sorted areas list)

Hi Camlorn,

Thank you for your well thought out reply. I'll try to respond to all of your points / comments / questions in order.

To start, the MUD is a ROM codebase (so yes, Diku derivative). It has been pretty heavily modified, but still retains most of ROMs core implementation.

Thank you for fixing/explaining the first loop. That makes total sense and was a silly error on my end.

The "to who" issue:" I'll be using "CHAR_DATA *ch" and displaying it to the char, with the "do_areas" command. I mentioned that I was relative inexperienced but I have wrote a decent amount of code.. I'm just not really familiar with many concepts. I've put together an achievements system (with a little help), a crafting system, and a large handful of skills/spells/bug fixes. Send_to_char, sprintf.... I'm familiar with all that. Anyway, I'm just mentioning that so you know that I have some experience. I always make sure I mention that I'm relatively inexperienced because I've often found when reseraching MUD-specific issues, that many of the responses are on a real "coder to coder" level and I'm not quite there yet. I think a "C" tutorial is a great idea; I'll look into it more today.

I've very recently started researching hashtables but they're still a bit over my head at this point.

You lost me a tiny bit in your next section about "first be aware that this is horrible" and then continuing on about a "MAX_AREAS" define. I know that we don't have one, and while I don't know how to dynamically allocate an array yet, I'm fine moving on from it for now... you mentioned that we can move on to a second approach.. Wasted space isn't a huge issue right now. I'd like to get the functionality down first and then optimize further later on, as I learn more.

I'll work on a complete function today and post back with what I end up with. Thank you again!
ww_crimson is offline   Reply With Quote