Hi,
I added a planet script that i found on some snippet 
site.  It works well and all, but in do_where, i would 
like to add to the top: 
You are in the Areaname, on planet Planetname.
Players near by:
Soandso           Roomname
Soandso2          Roomname2
etc...

This code I have right now is as follows:
void do_where( CHAR_DATA *ch, char *argument )
{
    char buf[MAX_STRING_LENGTH];
    char arg[MAX_INPUT_LENGTH];
    CHAR_DATA *victim;
    DESCRIPTOR_DATA *d;
    bool found;

    one_argument( argument, arg );

    if ( arg[0] == '\0' )
    {
        send_to_char( "Players near you:\n\r", ch );
        found = FALSE;
        for ( d = descriptor_list; d; d = d->next )
   
...it goes on, but thats the main part for what i want 
to do.  So I changed it as follows:

void do_where( CHAR_DATA *ch, char *argument )
{
    char buf[MAX_STRING_LENGTH];
    char arg[MAX_INPUT_LENGTH];
    CHAR_DATA *victim;
    DESCRIPTOR_DATA *d;
    AREA_DATA *pArea;
    bool found;

    one_argument( argument, arg );

    if ( arg[0] == '\0' )
    {
      sprintf( buf, "You are in the %s on planet %
s .\n\r", pArea->name, pArea->planet );
      send_to_char( buf, ch);

        send_to_char( "Players near you:\n\r", ch );
        found = FALSE;
        for ( d = descriptor_list; d; d = d->next )

So what am I doing wrong? Eh..? I do actually have all 
the planet code coded in and it works fine.  I just am 
not sure what to do here.  I'm new to code the ROM2.4b6 
code, and MUD code in general, but I was asked to do 
this for a friend...if you could help me out here, it 
would be great.  

Thanks,
-Mistral

Reply via email to