Hello! I quite recently took the task of adding a ROM snippet to my FUSS mud. Everything is going well, though there are a few errors. I managed to fix a few errors on my own (woo-hoo). But some of the errors coming up on my compile, im not familiar with.
act_obj.c: In function `do_shoot':
act_obj.c:3348: parse error before '(' token
act_obj.c:3349: parse error before '||' token
act_obj.c:3378: warning: implicit declaration of function `check_improve'
act_obj.c:3302: warning: statement with no effect
act_obj.c:3348: warning: statement with no effect
act_obj.c: At top level:
act_obj.c:3429: parse error before '}' token
act_obj.c: In function `do_reload':
act_obj.c:3443: too many arguments to function `get_obj_carry'
Now I looked in the code, and found this piece here and edited it. I may not of edited right.
if( can_use_skill( ch, number_percent( ), gsn_clip ) ) && IS_OBJ_STAT(gun,GUN_CLIP);
||( can_use_skill( ch, number_percent( ), gsn_energy ) ) && IS_OBJ_STAT(gun,GUN_ENERGY)
||( can_use_skill( ch, number_percent( ), gsn_shell ) ) && IS_OBJ_STAT(gun,GUN_SHELL)
||( can_use_skill( ch, number_percent( ), gsn_fuel ) ) && IS_OBJ_STAT(gun,GUN_FUEL)
||( can_use_skill( ch, number_percent( ), gsn_rocket ) ) && IS_OBJ_STAT(gun,GUN_ROCKET)
those are lines 3348-3352
here are 3429
if (recoil == 1)
{
send_to_char ("The recoil slows you down a bit.\n\r", ch);
WAIT_STATE(ch,1 * PULSE_VIOLENCE);
}
if (recoil == 2)
{
send_to_char ("The recoil sends throws you off balance.\n\r", ch);
WAIT_STATE(ch,2 * PULSE_VIOLENCE);
}
if (recoil == 3)
{
send_to_char ("The strong recoil almost numbs your arm.\n\r", ch);
WAIT_STATE(ch,3 * PULSE_VIOLENCE);
}
if (recoil == 4)
{
send_to_char ("The recoil almost shatters your hand.\n\r", ch);
WAIT_STATE(ch,4 * PULSE_VIOLENCE);
}
}
}
}
I removed the double brackets near the bottom thinking that was the error and It only caused more errors! So Im not sure whats wrong with that part.
There are alot more errors but I want to tackle one at a time. Mainly alot of "implicit declaration of function" errors which I never had to tackle before. Also a few piecies of the snippet I'm not quite sure since its ROM. Thanks in advance, as always :)
|