This message is a continuation of my previous messages listed in Compiling the Smaug Server:
Ok.... Heres my situation now.... its good... I got all of the objects, and mobiles/pc's to be listed under the room discriptions with comma's
Well.... I added what I thought was a simple IF statement (to add the text "You also see") if there were any objects/mobs in the room.
Well... I messed something up.
Heres the relevant code:
Ok... now... when I do a look in a room, I get the following:
Ex.
Now.... There are two objects in the room (and one mobile). I know the problem is my IF statement. But Im still kinda new at C, and really havnt had formal (or non-formal) training. It would be a really big help if someone could tell me what Im doing wrong.
Kelsid
Ok.... Heres my situation now.... its good... I got all of the objects, and mobiles/pc's to be listed under the room discriptions with comma's
Well.... I added what I thought was a simple IF statement (to add the text "You also see") if there were any objects/mobs in the room.
Well... I messed something up.
Heres the relevant code:
act_info.c
(do_look function)
if ( arg1[0] == '\0'
|| ( !IS_NPC(ch) && !xIS_SET(ch->act, PLR_BRIEF) ) )
{
send_to_char( MXPTAG ("rdesc"), ch);
send_to_char( ch->in_room->description, ch );
send_to_char( MXPTAG ("/rdesc"), ch);
/* Altered Room Descriptions */
if(ch->in_room->first_content != NULL || ( ch->in_room->first_person != NULL ) )
send_to_char("You also see ", ch);
return;
send_to_char( "\n\r", ch );
show_list_to_char( ch->in_room->first_content, ch, FALSE, FALSE, eItemGet );
show_char_to_char( ch->in_room->first_person, ch );
}
if ( !IS_NPC(ch) && xIS_SET(ch->act, PLR_AUTOMAP) ) /* maps */
{
if(ch->in_room->map != NULL)
{
do_lookmap(ch, NULL);
}
}
if ( !IS_NPC(ch) && xIS_SET(ch->act, PLR_AUTOEXIT) )
do_exits( ch, "auto" );
return;
}
Ok... now... when I do a look in a room, I get the following:
Ex.
[Mercuria, East Plaza]
Fairly expensive wares clutter this area of the plaza. Guards are particularly mindful to watch this area.
You also see
<1014hp 500m 734mv> (Invis 65)
Now.... There are two objects in the room (and one mobile). I know the problem is my IF statement. But Im still kinda new at C, and really havnt had formal (or non-formal) training. It would be a really big help if someone could tell me what Im doing wrong.
Kelsid