> What are lines 1087-1089? (ie: post them)
>
> Isn't post code when asking about compiling errors in the FAQ or am I just
> wishing it was?
the reason i didn't post them is because there aren't errors there...i
know this..and i stated this in my email..i'm not a newbie who can't spot
parse errors when i get a compiler messege like that...but if you want to
see for yourself..here is the struct that its talking about..
struct descriptor_data {
socket_t descriptor; /* file descriptor for sockeet */
socket_t ident_sock; /* socket used for ident process */
u_short peer_port; /* port of peer */
char host[HOST_LENGTH+1]; /* hostname */
byte bad_pws; /* number of bad pw attemps this login */
byte idle_tics; /* tics idle at password prompt */
int connected; /* mode of 'connectedness' */
int wait; /* wait for how many loops */
int desc_num; /* unique num assigned to desc */
time_t login_time; /* when the person connected */
char *showstr_head; /* for keeping track of an internal str */
char **showstr_vector; /* for paging through texts */
int showstr_count; /* number of pages to page through */
int showstr_page; /* which page are we currently showing? */
char **str; /* for the modify-str system */
char *backstr; /* added for handling abort buffers */
size_t max_str; /* - */
long mail_to; /* name for mail system */
int prompt_mode; /* control of prompt-printing */
char inbuf[MAX_RAW_INPUT_LENGTH]; /* buffer for raw input */
char last_input[MAX_INPUT_LENGTH]; /* the last input */
char small_outbuf[SMALL_BUFSIZE]; /* standard output buffer */
char *output; /* ptr to the current output buffer */
int bufptr; /* ptr to end of current output */
int bufspace; /* space left in the output buffer */
struct txt_block *large_outbuf; /* ptr to large buffer, if we need it */
struct txt_q input; /* q of unprocessed input */
struct char_data *character; /* linked to char */
struct char_data *original; /* original char if switched */
struct descriptor_data *snooping; /* Who is this char snooping */
struct descriptor_data *snoop_by; /* And who is snooping this char */
struct descriptor_data *next; /* link to next descriptor */
struct olc_data *olc; /*. OLC info - defined in olc.h .*/
int edit_number2; /* online mobprogs */
char *storage;
};
ObCircle:
i changed my G zone command so that my builders can specify a quantity
when they are giving objects to a mob...this makes things easier
especially with shops where you don't want the keep er to have an
unlimited stock....so..here goes the code...
in db.c..
in void load_zones...
simply remove the:
else if (strchr("G", ZCMD.command) != NULL) { /* ### */
so that the G command will be included in the group of commands
with 4 args..
then in void reset_zone...
change the G case to be..
case 'G': /* obj_to_char ### */
if (!mob) {
ZONE_ERROR("attempt to give obj to non-existant mob");
break;
}
if ((obj_index[ZCMD.arg1].number < ZCMD.arg2) &&
mob_load && (number(1, 100) >= ZCMD.arg3)) {
num_objs = ZCMD.arg4;
if (num_objs > 0)
for (i = 0; i < num_objs; i++) {
obj = read_object(ZCMD.arg1, REAL);
obj_to_char(obj, mob);
}
last_cmd = 1;
} else
last_cmd = 0;
break;
now any of the fourth arguments for the G command will specify a quantity..
now, for oasis...
in zedit.c
in zedit_save-to_disk
change the case G...arg4 to...arg4 = ZCMD.arg4...
change the zedit disp menu case 'G' to..
case'G':
sprintf(buf2, "%sGive it %s [%s%d%s], Chance %d%%, Max : %d, How many : %d",
MYCMD.if_flag ? " then " : "",
obj_proto[MYCMD.arg1].short_description,
cyn, obj_index[MYCMD.arg1].virtual, yel,
MYCMD.arg3 ? (101 - MYCMD.arg3): 100, MYCMD.arg2,
MYCMD.arg4 ? MYCMD.arg4 : 1
);
break;
change zedit_disp_arg4...case 'G' to..
case 'G':
send_to_char("How many would you like to give? ", d->character);
break;
in zedit_parse, case ZEDIT_ARG3..change the case 'G' to..
case 'G':
pos = atoi(arg);
if (pos == 100) {
OLC_CMD(d).arg3 = 0;
zedit_disp_arg4(d);
}
else if (pos > 0 && pos < 100) {
OLC_CMD(d).arg3 = 101 - pos;
zedit_disp_arg4(d);
}
else
send_to_char("Give a number between 1 and 100. Try again: ",
d->charaacter);
break;
now in zedit_parse, case ZEDT_ARG4...change case 'G' to..
case 'G':
pos = atoi(arg);
if (pos > 0 && pos < 50) {
OLC_CMD(d).arg4 = pos;
zedit_disp_menu(d);
}
else
send_to_char("Give a number between 1 and 50. Try again: ",
d->character);
break;
and i believe that's all....now..i just realized that this may be
different if you don't have the percentage loading snippets from the web
page..but still, i think that this would be a good start..
later
siv
"There is absolutely no problem we cannot solve, through careful, focused
application of extreme, mindless violence."
The Scorched Earth Party -
+------------------------------------------------------------+
| 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/08/00 PST