Welcome to the Builder Academy

Question d20MUD SRC With Various Fixes

More
11 Jan 2013 04:13 #1270 by zusuk
Some fixes on the d20MUD release, done by John Jackson.

I actually tried adding this file to the download section, but it kept on failing.

Attachment src.zip not found


Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100
Attachments:

Please Log in or Create an account to join the conversation.

More
13 Jan 2013 04:06 - 13 Jan 2013 14:46 #1275 by Nerian
With this new SRC files I found a few bugs with the rlist, olist, mlist, etc.... they wouldn't show, but I went through the code on oasis.list.c

Code:
two_arguments(argument, smin, smax); if (subcmd == SCMD_OASIS_ZLIST) { /* special case */ // if (*smin && is_number(smin)) if (smin != NULL && *smin && is_number(smin)) print_zone(ch, atoi(smin)); else list_zones(ch); return; }

First in the two arguments above was commented out (no idea why) I uncommented them out and it removed a couple of the warnings I received while compiling

I'm not sure what the different between the commented out line above and the line underneath it, but rasputin stock has that second line, so I changed it


Code:
if (!top_of_world) return; for (i = 0; i <= top_of_world; i++) { /** Check to see if this room is one of the ones needed to be listed. **/ if ((world[i].number >= bottom) && (world[i].number <= top)) { counter++;

Not sure if the if (!top_of_world) with the return is necessary or not, but rasputin had it and it didn't cause any errors after I added it, so I left it in


hopefully this helps somebody who wants to use this new src

I'm still having some other problems, but I'm working on those
Last edit: 13 Jan 2013 14:46 by Nerian.

Please Log in or Create an account to join the conversation.

More
13 Jan 2013 05:49 #1279 by zusuk
Yeah unfortunately I don't have much details, and I did some very bare-bones testing with it. It does seem to be more stable than the d20 codebase that you can download from Gicker.

When I tested it, I downloaded Gicker's version from his d20mud.com website, then just copied this SRC over his SRC and ran it that way.

Hope it helps, and thanks for the bug fixes Nerian :)

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

Please Log in or Create an account to join the conversation.

More
13 Jan 2013 10:54 #1283 by thomas

Nerian wrote: I'm not sure what the different between the commented out line above and the line underneath it, but rasputin stock has that second line, so I changed it

Code:
//if (!*arg || !strcmp(arg, ".")) { if (!strcmp(arg, ".") || (arg == NULL || !*arg)) {

You'll want to use the first version here. Or rather this, third, version:
Code:
if (arg == NULL || !*arg || !strcmp(arg, ".") {

The reason: you don't really want to be calling strcmp() on what might be a bad pointer. So you check it first.

Please Log in or Create an account to join the conversation.

More
13 Jan 2013 14:45 #1284 by Nerian
Your third version actually gave me some errors, but I switched back to the version Gickers had and it still works so that change was not needed

editing post above to remove that section

putting it here for reference
Code:
//if (!*arg || !strcmp(arg, ".")) { if (!strcmp(arg, ".") || (arg == NULL || !*arg)) { zrnum = world[IN_ROOM(ch)].zone; zvnum = zone_table[zrnum].number; } else { zvnum = atoi(arg); zrnum = real_zone(zvnum); }

Please Log in or Create an account to join the conversation.

Time to create page: 0.197 seconds