QUOTE
CODE
def attack_apply(attacker)
item_apply(attacker, $data_skills[attacker.attack_skill_id])
return $game_variables[7] + 1 if attack_skill_id = 56
return $game_variables[7] + 2 if attack_skill_id = 57
return $game_variables[7] + 4 if attack_skill_id = 58
return $game_variables[7] + 10 if attack_skill_id = 59
end
You need to use the ' += ' operator.
All you're doing there is telling the CPU to do a math equation without giving a result to anything.
CODE
def attack_apply(attacker)
item_apply(attacker, $data_skills[attacker.attack_skill_id])
$game_variables[7] += 1 if attack_skill_id = 56
$game_variables[7] += 2 if attack_skill_id = 57
$game_variables[7] += 4 if attack_skill_id = 58
$game_variables[7] += 10 if attack_skill_id = 59
end
Using += you're telling the computer to add on the the first equation.
EDIT: Also I didn't notice this earlier, but you're also trying to assign a number to your skill ID's
CODE
def attack_apply(attacker)
item_apply(attacker, $data_skills[attacker.attack_skill_id])
$game_variables[7] += 1 if attack_skill_id == 56
$game_variables[7] += 2 if attack_skill_id == 57
$game_variables[7] += 4 if attack_skill_id == 58
$game_variables[7] += 10 if attack_skill_id == 59
end
You need to use ' == ' when checking if something is equal to something.
Using the equals symbol on its own will always assign (or attempt to) something .
if attack_skill_id = 56 # <- This is not good, don't do it when checking it.
if attack_skill_id == 56 # <- That's what you want.
Merging your posts. Please do not double post ~ Ratty524