Im adding code to load mortals at a certain rnum based on there native selection (like classes). It uses if statements AFTER they pick there zone to set nativezone (the place to load). Il put the diff. code below and the errors. btw. it is a logic error, the code compiles. Well, its logic/runtime. It crashes for mortals, but immortals cant find the room (its there) and transfers to the mortal rnum for that native (it works). Any other info needed email me, this is based on some code from the hometowns snippet, and some by me. ---------------------------------------------- RunTime Error ---------------------------------------------- SYSERR: Illigal value(s) passwed to char_to_room. (room -4992/73 ch: 00B3a120 SYSERR:no valid target to act()! testchar advaced to level 1 '~crash~' (do to no where to load) ---------------------------------------------- config.c: ---------------------------------------------- room_vnum mortal_start_room[NUM_STARTROOMS +1] = { 0, /* Newbie loadroom element */ 1300, /* Africa */ 1500, /* Asia */ 1700, /* Antarctica */ 1900, /* Australia */ 2100, /* Europe */ 2300, /* N America */ 2500, /* S America */ 3099, /*Default /Error room */ }; ---------------------------------------------- db.c // Need to find a way to check all 8, did use a loop and coutner, but more problems ---------------------------------------------- if ((r_mortal_start_room[1] = real_room(mortal_start_room[1])) < 0) { log("SYSERR: Mortal start room does not exist. Change in config.c."); exit(1); } extern room_vnum mortal_start_room[NUM_STARTROOMS +1]; extern room_vnum immort_start_room; extern room_vnum frozen_start_room; room_rnum r_mortal_start_room[NUM_STARTROOMS +1]; // native start room room_rnum r_immort_start_room; /* rnum of immort start room */ room_rnum r_frozen_start_room; ---------------------------------------------- nativeloads.h ---------------------------------------------- #define NUM_STARTROOMS 8 ---------------------------------------------- interpreter.c ---------------------------------------------- extern room_rnum r_mortal_start_room[NUM_STARTROOMS +1]; case CON_QNATIVE: load_result = parse_native(*arg); if (load_result == NATIVE_UNDEFINED) { SEND_TO_Q("\r\nThat's not a native region.\r\nNative: ", d); return; } else GET_NATIVE(d->character) = load_result; if (GET_NATIVE(d->character) == NATIVE_AFRICA) GET_HOME(d->character) = 1; if (GET_NATIVE(d->character) == NATIVE_ASIA) GET_HOME(d->character) = 2; if (GET_NATIVE(d->character) == NATIVE_ANTARCTICA) GET_HOME(d->character) = 3; if (GET_NATIVE(d->character) == NATIVE_AUSTRALIA) GET_HOME(d->character) = 4; if (GET_NATIVE(d->character) == NATIVE_EUROPE) GET_HOME(d->character) = 5; if (GET_NATIVE(d->character) == NATIVE_NORTH_AMERICA) GET_HOME(d->character) = 6; if (GET_NATIVE(d->character) == NATIVE_SOUTH_AMERICA) GET_HOME(d->character) = 7; if (GET_NATIVE(d->character) == NATIVE_UNDEFINED) GET_HOME(d->character) = 8; -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 04/11/01 PDT