Help a newbie..

Posted by Gareth555 on Wed 25 Jun 2003 12:27 PM — 8 posts, 32,356 views.

#0
Help!

could one you coding geniuses tell me how to add
exits for se sw ne nw to the grid maker code i'm using.
i give an example here of the pre existing exit codes and a link to the full code im using.
http://www.gammon.com.au/forum/bbshowpost.php bbsubject_id=2854
sorry about posting this again but i got zero responses.

// Check to see if we can make N exits
if(room_count % x) {

location = get_room_index(vnum);
tmp = get_room_index(room_hold[room_count]);

xit = make_exit( location, tmp, 0 );
xit->keyword = STRALLOC( "" );
xit->description = STRALLOC( "" );
xit->key = -1;
xit->exit_info = 0;

}

// Check to see if we can make S exits
if((room_count - 1) % x) {

location = get_room_index(vnum);
tmp = get_room_index(room_hold[room_count - 2]);

xit = make_exit( location, tmp, 2 );
xit->keyword = STRALLOC( "" );
xit->description = STRALLOC( "" );
xit->key = -1;
xit->exit_info = 0;

}


// Check to see if we can make E exits
if( (room_count - 1) % (x * y) < x * y - x ) {

location = get_room_index(vnum);
tmp = get_room_index(room_hold[room_count + x - 1]);

xit = make_exit( location, tmp, 1 );
xit->keyword = STRALLOC( "" );
xit->description = STRALLOC( "" );
xit->key = -1;
xit->exit_info = 0;

}

// Check to see if we can make W exits
if( ( room_count - 1) % (x * y) >= x ) {

location = get_room_index(vnum);
tmp = get_room_index(room_hold[room_count - x - 1]);

xit = make_exit( location, tmp, 3 );
xit->keyword = STRALLOC( "" );
xit->description = STRALLOC( "" );
xit->key = -1;
xit->exit_info = 0;

}

// Check to see if we can make D exits
if( room_count > x * y ) {

location = get_room_index(vnum);
tmp = get_room_index(room_hold[room_count - x * y - 1]);

xit = make_exit( location, tmp, 5 );
xit->keyword = STRALLOC( "" );
xit->description = STRALLOC( "" );
xit->key = -1;
xit->exit_info = 0;

}

// Check to see if we can make U exits
if( room_count <= maxnum - (x * y) ) {

location = get_room_index(vnum);
tmp = get_room_index(room_hold[room_count + x * y - 1]);

xit = make_exit( location, tmp, 4 );
xit->keyword = STRALLOC( "" );
xit->description = STRALLOC( "" );
xit->key = -1;
xit->exit_info = 0;

#1
Is it me? or was this question already asked once?
#2
The question dear friend, is not wether it was asked
once but wether it was answered once,
and the answer of course.. is
no

so i decided to post it under smaug coding to see
wether it would increase my chances of raising
a response..

it seems to have drawn a response, but
alas,
not one that affords me any kind of advantage
perhaps i should post it under
please f****** help clueless programmer
seeks pear of wisdom


#3
pear? pearl? pea?
USA #4
A few simple things to remember when requesting help on the forums......

Everyone here has their own interests to deal with and will only help as much as they are willing or capable of.

This is NOT an official SMAUG support forum, or any other official forum except MC.

The more of an ass you make of yourself, the less likely someone is to be willing to help you.

The more duplicate requests you post, the less likely someone is to help you because it's generally considered rude to deliberately double post.

That said, the best person to ask for help is the one that wrote the original function you are using - most coders are reluctant to work on 'outside projects' in the first place so be glad you got any help at all.
#5
thank you so much for the useful advice.
now that you have finished your little lecture
my dear lord of cats, let me remind you that you
are not in fact the lord of kitties, or anything else.
What you are, like a lot of people, is someone
completely absorbed in a text based fantasy largely
due to problems in dealing with reality. Don't worry,
I myself suffer from the same problem to some degree.
Let me remind you that you are a human being, worth more
or less (not much more or much less) than anyone else out
there. Simply because you may or may not have a talent
for programming does not cede you the right to
outright rudeness.
really, i direct this to you and most of the arrogent posters out there, who have been playing a glorified version
of donkeykong for so long that they have, in the parlance of our times 'delusions of grandeur.'
be nice my boy.
mmmm ok? some people program, some paint... some garden..

beeee niceeeee
your text based characters wont be holding your hand
when you die one day.. not so?

Australia Forum Administrator #6
Quote:

The question dear friend, is not wether it was asked
once but wether it was answered once,
and the answer of course.. is
no



Your original post (subject 2856) was at 11:58 am my time, and your follow-up question (this thread, 2859) was at 10:27 pm the same day. This is under 12 hours between posts. Remembering that some of us live at the other sides of the world from each other, and may be asleep for 8 hours, and doing other things like eating, working and so on, it isn't really reasonable to start double-posting and complaining that no-one answered, without waiting at least 24 hours.

As Meerclar pointed out all of the advice posted here is on a voluntary basis, and a little courtesy goes a long way.

Complex questions like you seem to be asking - to write or debug a lengthy piece of C code are less likely to get a quick answer, than a query about how to use something which might require a fairly quick answer.

Quote:

I'd deeply appreciate any tips. I'm not a coder..
perhaps a link to a snippet or something?


Zhamel gave you a snippet which is what you requested. To be fair to yourself, if you are not a coder, perhaps you could try learning coding with a simpler project than modifying a MUD server, which is around 100,000 lines of C code.

I do not want this forum to degenerate into insults and counter insults, as I have seen some other mailing lists do, and people who wish to do that can post elsewhere.

Australia Forum Administrator #7
Having re-read this thread I would add that Meerclar dealt with you courteously, and that your response to him was not warranted.