I finally started working on restricting by my Remort Level code.
I have gotten to the point that it saves, at least in Zedit. I somehow missed a variable or misused one somewhere.
In Zedit I have this... under zedit_setup.
zone->zrlevel = zone_table[OLC_ZNUM(d)].zrlevel;
Under zedit_save_internally I have
zone_table[OLC_ZNUM(d)].zrlevel = OLC_ZONE(d)->zrlevel;
Further down I have
/*
Remort Level restrictions for Zones Bramage */
static bool zedit_get_remort(struct descriptor_data *d, char *buf)
{
if (OLC_ZONE(d)->zrlevel == -1) {
sprintf(buf, "<Not Set!>");
return FALSE;
}
sprintf(buf, "%d", OLC_ZONE(d)->zrlevel);
return TRUE;
}
Finally I have this for the menu choice of U....
/*
*/
case ZEDIT_ZRLEV:
/* Parse and add remort level minimum and return to main menu. */
pos = atoi(arg);
if (!isdigit(*arg) || pos < -1 || pos > 20)
write_to_output(d, "Try again (0-20) : ");
else {
OLC_ZONE(d)->zrlevel = pos;
OLC_ZONE(d)->number = 1;
zedit_disp_menu(d);
}
break;
Then in act.movement.c under do_simple_move I added this.
/* Check zone remort level restrictions */
if ((ZONE_ZRLVL(GET_ROOM_ZONE(going_to)) != -1) && ZONE_ZRLVL(GET_ROOM_ZONE(going_to)) > GET_REMORT_LEVEL(ch)) {
send_to_char(ch, "This zone is restricted to a higher Remort level.\r\n");
return (0);
}
So I am thinking that I somehow made some variable mistake on choice. I am just not seeing it right now so I am asking if anyone else might see my mistake.
Just a guy coding a mud at home for no reason but the challenge.