for (i = 0; i < 5; i++)
{
if (materia->value[i] == sn && materia->level > i )
skill = 100;
}
for (level = 0; level < 5; level++)
{
if (materia->value[level] == sn && materia->level > level )
skill = 100;
}
if (materia->value[0] == sn)
{
skill = 100;
}
else
{
/* previous for-loop */
}
This below statement is if the level of the object is greater than the value give them the skill.
Now i'm trying to toy with this and make it so I can start the object off at level 0.
I tried using materia->level >= i but that gives me value 0 and value 1 for whatever reason.
I've tried materia->level + 1 > i and that gives me two. I've tried subtracting - 1 from i
such as > i - 1). Most everything i've listed is the stating the same thing so how do I add one to materia->level falsely
just so it will allow objects at level 0 to have the value0 skill?
To go into more with this just to make sure i've covered my grounds.
Level: 0
v0 Fire
v1 Fire2
v2 Fire3
v3 None
v4 Fire4
With this, I get no spell/skill from it. When it levels to 1, I get the value0,level 2 value0 and 1. So mainly, im just trying
to get the value 0 even if the object is level 0. This goes for all of them. If the object level is the same or greater than the value, you gain that skill/spell associated with it.
Edit by kiasyn: added code tags