I added some line to do_wear and after that my game crashes when i m trying to wear a weapon.
it gives:
and the code i added is:
it gives:
Wed Jan 29 01:55:15 2020 :: Oblisgr (127.0.0.1) has connected.
Segmentation fault (core dumped)
and the code i added is:
obj=get_obj_carry(ch, arg1);
if ( (LEARNED(ch, gsn_daggers) < 1) && obj->value[3] == 0 )
{
send_to_char("You have to practice &B[daggers] weapon skill first.&D yet.\r\n", ch);
return;
}
if ( (LEARNED(ch, gsn_swords) < 1) && obj->value[3] == 1 )
{
send_to_char("You are not studied &B[swords]&D yet.\r\n", ch);
return;
}
if ( (LEARNED(ch, gsn_greatswords) < 1) && obj->value[3] == 2 )
{
send_to_char("First you have to learn &B[greatswords]&D weapon proficiency.\r\n", ch);
return;
}
if ( (LEARNED(ch, gsn_hatchets) < 1) && obj->value[3] == 3 )
{
send_to_char("You are not studied &B[hatchets]&D yet.\r\n", ch);
return;
}
if ( (LEARNED(ch, gsn_greataxes) < 1) && obj->value[3] == 4 )
{
send_to_char("You are not studied &B[greataxes]&D yet.\r\n", ch);
return;
}
if ( (LEARNED(ch, gsn_maces) < 1) && obj->value[3] == 5 )
{
send_to_char("You are not studied &B[maces]&D yet.\r\n", ch);
return;
}
if ( (LEARNED(ch, gsn_mauls) < 1) && obj->value[3] == 6 )
{
send_to_char("You are not studied &B[mauls]&D yet.\r\n", ch);
return;
}
if ( (LEARNED(ch, gsn_polearms) < 1) && obj->value[3] == 7 )
{
send_to_char("You are not studied &B[polearms]&D yet.\r\n", ch);
return;
}
if ( (LEARNED(ch, gsn_fists) < 1) && obj->value[3] == 8 )
{
send_to_char("You are not studied &B[fists]&D yet.\r\n", ch);
return;
}
if ( (LEARNED(ch, gsn_staves) < 1) && obj->value[3] == 9 )
{
send_to_char("You are not studied &B[staves]&D yet.\r\n", ch);
return;
}
if ( (LEARNED(ch, gsn_wands) < 1) && obj->value[3] == 10 )
{
send_to_char("You are not studied &B[wands]&D yet.\r\n", ch);
return;
}
if ( (LEARNED(ch, gsn_guns) < 1) && obj->value[3] == 11 )
{
send_to_char("You are not studied &B[guns]&D yet.\r\n", ch);
return;
}
if ( (LEARNED(ch, gsn_bows) < 1) && obj->value[3] == 12 )
{
send_to_char("You are not studied &B[bows]&D yet.\r\n", ch);
return;
}
if ( (LEARNED(ch, gsn_crossbows) < 1) && obj->value[3] == 13 )
{
send_to_char("You are not studied &B[crossbows]&D yet.\r\n", ch);
return;
}
if ( (LEARNED(ch, gsn_thrown) < 1) && obj->value[3] == 14 )
{
send_to_char("You are not studied &B[thrown]&D yet.\r\n", ch);
return;
}