Some Variables in Damage Formula Returning Error

Hi! I have a damage randomizer system that generates a random value in a variable, then references that variable in the damage formula. However, for some reason some variables only return an error instead of the generated number, so the damage always ends up as 0.

After extensive testing, I've narrowed the problem The error appears to be tied to the variable location. I have no trouble pulling the variable values from v[0001] through v[0009], nor from v[0076] and above. The issue seems to be localized to v[0010] through v[0075].

The problem is not the random number generation. The error occurs even if the variable is set to a constant value.

The problem doesn't appear to be the variables themselves. Other uses outside of the damage formula can reference the value without issue, and in-game testing shows that the variables are registering and changing as expected.

The problem occurs both in-game when playtesting and when testing battles from the database.

I have no plugins installed, so nothing outside of the base program should be affecting it.

I could theoretically work around this by just not using variables in that range for this purpose, but:
a) that would mess with my organization, which would be kind of annoying, but more importantly
b) it doesn't explain why this is happening, which is what really has me concerned.

I'm flummoxed, folks! Any insights or suggestions would be appreciated. I've been staring at this problem for too long, haha.
Other uses outside of the damage formula can reference the value without issue
Sounds like the issue is with your formula then and it not being able to handle the numbers 10 - 75, or rather 0010 to 0075. Are you using leading zeros in your references? You might want to remove them because it might be getting parsed as octal.
Ah! That solved it! It never occurred to me to remove the leading zeroes.

Thank you so much!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/some-variables-in-damage-formula-returning-error.157007/