05-01-2007, 03:19 PM
Well you simply want the CurrentLevelStats + NextLevelStats.
So, lets say you still want to use the function. You could do it like this:
Now the GetVar will use the "i" variable. Something like this:
So in the For loop you will need to add them together, so the previous is added to the new etc..
Remember that the GetVar isnt correctly done here.. I think this would be what your looking for? Otherwise I can give you some other ideas or develop this one.
So, lets say you still want to use the function. You could do it like this:
Code:
Function GetPokeStats(ByVal PokemonIndex As Long, ByVal level As Long) As Long
Dim i as Byte
For i = 1 to Level
Int(Pokemon(PokemonIndex).Str) = GetVar()
etc...
Next i
End Function
Now the GetVar will use the "i" variable. Something like this:
Code:
GetVar(path, "LEVEL & i, "Attack")
So in the For loop you will need to add them together, so the previous is added to the new etc..
Code:
Function GetPokeStats(ByVal PokemonIndex As Long, ByVal level As Long) As Long
Dim i as Byte
For i = 1 to Level
Int(Pokemon(PokemonIndex).Str) = Int(Pokemon(PokemonIndex).Str) + GetVar(path, "LEVEL & i, "Attack")
etc...
Next i
End Function
Remember that the GetVar isnt correctly done here.. I think this would be what your looking for? Otherwise I can give you some other ideas or develop this one.