void do_cast( CHAR_DATA *ch, char *argument )
{
char tmp[100];
char buf[MSL];
char *color;
int sn = -1;
float mod_time;
tmp[0] = '\0';
one_argument(argument,tmp);
if( IS_CASTING(ch) )
{
send_to_char("You are already casting a spell. Move or use @@Rstop@@N to cancel.\r\n",ch);
return;
}
if( (sn = skill_lookup(tmp)) < 0 )
{
send_to_char("Wiggle swiggle biggle?\r\n",ch);
return;
}
switch( skill_table[sn].target )
{
default: color = "@@N"; break;
case TAR_IGNORE: color = "@@p"; break;
case TAR_CHAR_OFFENSIVE: color = "@@e"; break;
case TAR_CHAR_DEFENSIVE: color = "@@l"; break;
case TAR_CHAR_SELF: color = "@@r"; break;
case TAR_OBJ_INV: color = "@@y"; break;
}
snprintf(buf,MSL,"$n's eyes begin %sglowing@@N as $e begins to utter magical incantations!",color);
act(buf,ch,NULL,NULL,TO_ROOM);
ch_printf(ch,"You begin casting %s%s@@N.\r\n",color,skill_table[sn].name);
mod_time = skill_table[sn].beats;
if( IS_SET(race_table[ch->race].race_flags,RACE_MOD_FAST_CAST) )
mod_time *= 0.85;
free_string(ch->casting->arg);
ch->casting->arg = str_dup(argument);
ch->casting->time = mod_time;
ch->casting->max_time = (mod_time * sysdata.max_pushback);
cast_list.push_back(ch);
return;
}
Program received signal SIGSEGV, Segmentation fault.
0x080beb11 in do_cast (ch=0x409285e0, argument=0x40927323 "'tesseract' seer") at magic.c:330
330 if (find_spell(ch,arg1) < 1
(gdb) bt
#0 0x080beb11 in do_cast (ch=0x409285e0, argument=0x40927323 "'tesseract' seer") at magic.c:330
#1 0x080bd071 in interpret (ch=0x409285e0, argument=0x40927323 "'tesseract' seer") at interp.c:636
#2 0x08076bc5 in substitute_alias (d=0x40926f00, argument=0x40927321 "c 'tesseract' seer") at alias.c:67
#3 0x08080137 in game_loop_unix (control=5) at comm.c:844
#4 0x0807faeb in main (argc=2, argv=0xbffff6e4) at comm.c:460
I installed the rom casting snippet, SoldierSide Magic System. Im having one problem..
c 'identify' shield
You begin to cast a spell. (type 'stop' to cancel)
<16592/25655hp 12657/15580m 3817/33265mv (621870exp)>
You move into a dance like motion as you speak the ancient tongue!
<16592/25655hp 12657/15580m 3817/33265mv (621870exp)>
You move into a dance like motion as you speak the ancient tongue!
The awesome power of magic flows to your finger-tips!
You don't know any spells of that name.
it says "You don't know any spells of that name." for every spell i try to cast..