Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - petriomelony

Pages: [1] 2 3
1
Hi everyone,

I'm using the DW distribution lib with FluffOS 2.20-ds01, on linux, and was wondering if anyone else ran into a problem with mob spawn causing a seg fault, in pumpkin town (on squash street).

This is the trace I get

Code: [Select]
Object: /d/dist/pumpkin/squash/squash4, Program: /d/dist/pumpkin/inherit/cityroom.c
   in make_citymonster() at /d/dist/pumpkin/inherit/cityroom.c:61
arguments were (0)
Object: /d/dist/pumpkin/hospital, Program: /d/dist/pumpkin/hospital.c
   in ok_to_clone() at /d/dist/pumpkin/hospital.c:490
arguments were ()
Object: /secure/simul_efun, Program: /secure/simul_efun/modified_efuns.c
   in named_livings() at /secure/simul_efun/modified_efuns.c:232
arguments were ()
'     <fake>' in '/            <driver>' ('/   secure/simul_efun')

I checked the hospital.c files first (there's a couple of them), and I think the piece of code in question is trying to count the mobs in Ankh-Morpork, which isn't part of the distributed lib:

Code: [Select]
// This function returns 1 if its ok to clone some more npcs and
// false if not.
int ok_to_clone() {
  if(time() > last_check + 300) {
    last_check = time();
    am_npcs = sizeof( filter( named_livings(),
      (: environment( $1 ) && base_name( environment( $1
       ) )[0..4] == "/d/am" :) ) );
  }
  return ( am_npcs < MAX_AM_LIVING );
}

where "/d/am" doesn't exist, but MAX_AM_LIVING is defined in another file alright.  however, there are also 4 hospital files to do with pumpkin, one in /d/dist/pumpkin, and the others in /d/dist/pumpkin/pumpkin, /d/dist/pumpkin/inherit, and /d/dist/pumpkin/hospital.  pumpkin's path.h only points to the one in the base pumpkin folder, though (i also just found a typo where it was referring to hostpial.h, but i don't think that's the issue since each hospital.c has hospital.h included at the top)

i think there's also something wrong with named_livings(), but i have no idea what the trace is saying.  the e_fun code in the trace is simply:

Code: [Select]
/** @ignore yes */
object *named_livings() {
#if efun_defined(named_livings)
  return filter( efun::named_livings(), (: reference_allowed :) );
#else
  return filter( LIV->named_livings(), (: reference_allowed :) );
#endif
} /* named_livings() */

any input would be appreciated!

edit: this doesn't happen all the time, only if i leave the mud running a while (presumably when the number approaches/hits the max?)

2
Discworld Discussion / Re: Help with dw make install error
« on: June 10, 2009, 06:48:11 AM »
I'm not sure of the exact cause, but I feel like it's because you're missing one or more packages necessary to properly make the file.

Do you have the following packages installed?
build-essential
gcc
bison
yacc
zlib

I remember getting a similar "command not found" error (though perhaps not for the same command), but I don't really have any way to test it now :( sorry.

Hope this helps!

3
General / Re: A Challenge
« on: May 04, 2009, 06:59:10 PM »
heh, running a search on the two area names he mentioned, it looks like it's Merentha, or perhaps if Merentha distributes those areas with their code, a mud that uses the Merentha lib.

4
Discworld Discussion / Re: Error when logging in
« on: April 19, 2009, 11:05:44 PM »
im kinda new to creating but so far have had very little troubles with the new release just the relogging in part

did you not have any problems with MXP and such?

i also run into the same relogging problem as you.

5
Skylib Stuff / automap with skylib?
« on: April 19, 2009, 01:51:43 AM »
after browsing through the code, it looks like the discworld files for maps are still included in the lib... does anyone know how to use them with skylib, by chance?

6
Skylib Stuff / add_item
« on: April 13, 2009, 06:43:24 PM »
I was working my way through the new discworld creator LPC for dummies guide (which is fantastic, if anyone wants to know.  a big props to Drakkos for it), and I got to a part about making items in the room searchable.  Now I know that skylib != dw, but they have quite a few similarities.  I just could not get the searchable items thing working (without defining a search string comparison).

This is what the guide said to try:

Code: [Select]
add_item ("jagged rock",
({
  "long", "This is a jagged rock.",
  "searchable", "#search_rock",
  "position", "on the jagged rock",
  ({"kick", "punch"}), "Ow! That stung!\n",
}));

and this is what I ended up doing:

Code: [Select]
int do_search(string str)
{
  if (str == "rock")
  {
    call_out ("search_rock", 3);
    return 1;
  }
  return -1;
}

I know call_outs are bad, which is why I wanted to avoid this code, but this is what was used in one of the stock rooms (part of the creator school). 

Note: Using the example code from the DW LPC guide, I could literally type "searchable rock" and it would return the string "#search_rock".  I also tried changing "searchable" to just "search", but that would just do a room search if i typed "search rock".

I guess my question is: does anyone know of a better way to make something searchable in skylib?

Thanks!

7
Skylib Stuff / Re: efuns?
« on: April 12, 2009, 08:09:01 AM »
Crat, you're not unaccommodating!  Don't be silly.

I think that I'm a fair newbie at LPC, so I appreciate the fact that you're watching out for us, making sure we don't do more damage than necessary.

And like you said in another post, I can always just use windows explorer to search through files, if I'm desperate :)

8
Skylib Stuff / Re: efuns?
« on: April 12, 2009, 08:03:20 AM »
Sounds like the driver was compiled without PACKAGE_EXTERNAL defined in local_options hence the undefined function error.  Since your using windows, I would assume this is due to support for exec() within whatever compiler was used to build it.

The only way to enable this is to re-compile the driver from source and make sure that PACKAGE_EXTERNAL is defined.

You are correct!  I found the local_options file (local_options.skylib) and it has #undef PACKAGE_EXTERNAL.

Now I'm wondering if it's really worth it to try and recompile with the changed option, or whether Cratylus disabled it for a good reason.  I guess it's not that big of a deal if I can't use grep.

9
Skylib Stuff / efuns?
« on: April 11, 2009, 09:16:59 PM »
Hello everyone,

I just started looking at Skylib, and so far it looks awesome.  A big thanks to Cratylus for making the bundle that works on windows :)

I ran into a bit of a problem with the 'grep' command internal to the mud, and traced it back to an external_start efun.  The mud says:

Code: [Select]
/secure/cmds/creator/grep.c line 61: Undefined function external_start before ;

where line 61 is where grep.c uses external_start:

Code: [Select]
    if( nfiles || !search )
        fd = external_start( 6, arg, "read_call_back",
            "write_call_back", "close_call_back");
    else
        return notify_fail("Grep needs at least one file.\n");

    if( fd == -1 )
        return notify_fail("Grep failed for some reason.\n");

looking at the help file for external_start, it says the first parameter passed should be an int, for one of five external commands specified in the config file.  could the fact that it's a 6 be messing it up?

i'm running skylib right out of the bundle (with the included fluffos-2.9).

any advice would be greatly appreciated! :)

10
Dead Souls Support / inventory item order
« on: December 06, 2007, 10:05:31 AM »
is there any way to make it not so random?  every time i type "i" i get a different order of items... does anyone know which file should i look at if i want to make it say, chronological in the order they were obtained, or something?

12
Dead Souls Support / Re: random short desc using switch statement
« on: November 21, 2007, 09:41:04 AM »
hmm... after playing around with that code for a little, i can look at the wand once after cloning it, and then it gives errors after that... i believe it is a problem with AddSave.  here's the error:

Code: [Select]
*Left hand side of += is a number (or zero); right side is not a number.
Object: /domains/London/weap/wand#85 (/lib/std/item.c) at line 52

'<function>' at /secure/save/creators/p/petriomelony (<function>) at /:0
'cmdAll' at /secure/save/creators/p/petriomelony (/lib/command.c) at line 139
'do_look_obj' at /verbs/items/look at line 96
'do_look_at_obj' at /verbs/items/look at line 109
'eventShow' at /domains/London/weap/wand#85 (/lib/std/item.c) at line 262
'eventShow' at /domains/London/weap/wand#85 (/lib/events/look.c) at line 204
'GetExternalDesc' at /domains/London/weap/wand#85 (/lib/std/item.c) at line 52
Trace written to /log/runtime

13
Dead Souls Support / Re: random short desc using switch statement
« on: November 20, 2007, 03:03:10 PM »
hmm, i put something similar to:

Code: [Select]
string longdesc = NewLong();

outside of the create function, and then did

Code: [Select]
SetLong(longdesc);

inside the create, and it's still resetting the desc every time i quit and re-log.

14
Dead Souls Support / Re: random short desc using switch statement
« on: November 20, 2007, 01:48:31 PM »
hmm.. i'm finding (with crat's code structure and my own item) that the random values don't persist... when i quit and log back in, the values are different, and when i reload the item, the values are different... is there a simple way to change this?

15
Dead Souls Support / Re: random short desc using switch statement
« on: November 16, 2007, 01:25:00 PM »
wow, this is exactly the same sorta thing that i was looking for :) sweet deal

ps, personally i'd want a "bursting koi".

Pages: [1] 2 3