Hello: I've got a problem with a ritual command. What it does is the player does the movements involved with a ritual and then "intones" the ritual (along with any arguments for the ritual) but when they do the final intone command, it hangs just that player. The original coder, whom I contacted, said they thought it might be overwriting the buffer, but they never got around to really looking at. Can anyone see anything in here which they would be able to help with? I will also supply the ritual I know it hangs on (though it does it with all rituals). Any help would be appreciated greatly.
if(!str_prefix(arg2, "rites")) { rn = 1; send_to_char("Available rituals are:\n\r", ch); for(sn = 0; ritual_table[sn].name != NULL; sn++) { if(rite_available(sn, ch)) { sprintf(arg2, "%14s", ritual_table[sn].name); send_to_char(arg2, ch); rn++; } if(rn%4==0) send_to_char("\n\r", ch); } send_to_char("\n\r", ch); send_to_char("In order to use any of the above rituals,", ch); send_to_char(" you need to know the proper actions.\n\r", ch); send_to_char("There is no automated method of learning rites.)\n\r", ch); return; }
send_to_char("Are you trying to list the actions or rites?\n\r",ch); return; }
if((rn = riteaction_lookup(arg1)) >= 0 && rn < MAX_RITE_ACTIONS) { if(ch->ritepoint >= MAX_RITE_STEPS) { send_to_char("You can't add any more steps to this ritual!\n\r",ch); send_to_char("(Use 'ritual intone' to complete it.)\n\r",ch); return; }
vo = (void *) victim; target = TARGET_CHAR; break;
case TAR_CHAR_SELF: if ( arg2[0] != '\0' && !is_name( target_name, ch->name ) ) { send_to_char("You cannot perform this ritual for another.\n\r", ch); return; }
vo = (void *) ch; target = TARGET_CHAR; break;
case TAR_OBJ_INV: if ( arg2[0] == '\0' ) { send_to_char( "What should the ritual be performed upon?\n\r", ch ); return; }
if ( ( obj = get_obj_carry( ch, target_name, ch ) ) == NULL ) { send_to_char( "You are not carrying that.\n\r", ch ); return; }
vo = (void *) obj; target = TARGET_OBJ; break;
case TAR_OBJ_CHAR_OFF: if (arg2[0] == '\0') { if ((victim = ch->fighting) == NULL) { send_to_char("Perform the ritual on whom or what?\n\r",ch); return; }
I've got a problem with a ritual command. What it does is the player does the movements involved with a ritual and then "intones" the ritual (along with any arguments for the ritual) but when they do the final intone command, it hangs just that player. The original coder, whom I contacted, said they thought it might be overwriting the buffer, but they never got around to really looking at. Can anyone see anything in here which they would be able to help with? I will also supply the ritual I know it hangs on (though it does it with all rituals). Any help would be appreciated greatly.
Ritual I know it hangs on:
Thanks,
Arholly