d20MUD SRC With Various Fixes

  • zusuk
  • zusuk's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • LuminariMUD Developer
More
5 years 8 months ago #1270 by zusuk
d20MUD SRC With Various Fixes was created 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
5 years 8 months ago - 5 years 8 months ago #1275 by Nerian
Replied by Nerian on topic d20MUD SRC With Various Fixes
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

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


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: 5 years 8 months ago by Nerian.

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

  • zusuk
  • zusuk's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • LuminariMUD Developer
More
5 years 8 months ago #1279 by zusuk
Replied by zusuk on topic d20MUD SRC With Various Fixes
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
5 years 8 months ago #1283 by thomas
Replied by thomas on topic d20MUD SRC With Various Fixes

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

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

You'll want to use the first version here. Or rather this, third, version:
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
5 years 8 months ago #1284 by Nerian
Replied by Nerian on topic d20MUD SRC With Various Fixes
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
//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: 1.183 seconds