Hi all.. *ahum* this fault is definately due to a brainlapse in the way I have learned pointers and so on. but anyway. I'm trying to make a look <item> on <person>, and have allready made a look <item> in <bag> (This one works perfectly). now, I would like to be able to do 'look 2.ring on guard' (without ' of course) So I looked around to find something I could use. this is what I whipped up. void look_on_something(struct char_data * ch, char *object, char *victim) { struct char_data *found_char = NULL, *lame_char = NULL; struct obj_data *f_obj = NULL; int bits, found = FALSE, j, i = 0, number; char *desc; char tmpname[MAX_INPUT_LENGTH]; char *tmp = tmpname; strcpy(tmp, object); bits = generic_find(victim, FIND_CHAR_ROOM, ch, &found_char, &f_obj); if(!found_char && GET_LEVEL(ch) >= LVL_IMMORT) bits = generic_find(victim, FIND_CHAR_WORLD, ch, &found_char, &f_obj); if (!found_char) { if (GET_LEVEL(ch) < LVL_IMMORT) send_to_char("Sorry, but you can't see that person anywhere in your vicinity!\r\n", ch); else send_to_char("Seems like that person isn't logged in!\r\n", ch); return; } number = get_number(&tmp); And here it crashes, and GDB tells me: --- SNIP to GDB ----- Program received signal SIGSEGV, Segmentation fault. show_obj_to_char (object=0x0, ch=0x8301758, mode=5) at act.informative.c:169 169 else if (object->short_description && ((mode == 1) || --- Snip Ends ---- not that this gave much info, except I can see that it ponders into show_obj_to_char which I at no place in the code call.. I think it has something to do with the &tmp variable, but I can't see what's wrong.. Hope someone can help.. :) Kind regards S. P. Skou serces@mud.dk - Implementor at The realm of Chaos +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST