the actual value is between 10 and 100. I am 100% sure the variable is outputting correctly. The problem is not in the variable. I have a slider for adjusting the volume, which is then set to the actual variable (sfx_volume = int(sfx_volume);) so that the variable is set to an absolute number, and the number does not have decimals, and is not set into a vector.

I can set the variable exactly, using the console and would get the same problem.

I think that something is causing the str_for_num function to go crazy, but only in specific things.

For instance, recently I was setting a variable for a level to load, once you finish a game it loads the next level. The levels are named level01.wmb - level10.wmb . Now, the level loading worked perfect until it got to level 10, which, when i checked the code, was something like this:

level-----.wmb

the ----- being odd symbols that don't make any sense. there was no number or anything, and the problem is not the variable or the actual string...the problem lies somewhere in the str_for_num turnover. I'm not blaming this on the function, but there is something that is causing it to go awry.

And also, I've checked my list of functions and variables, there is no variable or function that i named str_for_num, so that's not it.

Believe me, I've tested this many times, I know for sure that the variables and actual strings are not the cause.

I have thought of one thing that may lead to it. Is there a limit to the amount of strings that you can have defined? I think if this is possible than it may be the culprit, I may have too many strings defined. ( I have around 180 or so defined )

edit: to confirm that the variables are correct, I used a watch and debug mode. They are set properly.

edit2: I'm starting to debate about writing a function that copies the variable to a text file and copies that to a string, it would possibly eliminate the problem, but I don't want to have to do that to fix it :P

Last edited by mpdeveloper_B; 06/04/09 20:00.

- aka Manslayer101