QB64.org Forum
Active Forums => Programs => Topic started by: gabrilesi95 on December 30, 2020, 06:22:04 am
-
So, when I try to set the variable EP in one of my programs, it just simply won't change the variable. Does anyone know what the problem is? If so, please tell me. (I think it is a bug or the program is just out of memory, although it is using 113.3 MB of memory, it hasn't given me an error.)
-
Share the code, please. I’d imagine it’s a scope error, with a local variable not sharing values, or else a separate routine resetting the value back to 0.
-
+1 Yes, you might find the problem yourself by isolating it with fewest lines of code possible.
On the other hand, sometimes you need the Keyword or Command or the general topic under which to search Help,
and sometimes you just gotta share the code :)
-
Make sure you have not dimensioned that variable as something else, some other place. For instance, if I have a DIM a as INTEGER and set it to the value of 3, and then in some sub I try to make a = 5, The program thinks I mean let a! = 5, the SINGLE default. So in fact, I now have two variables, both named a, but with two different values. The a in the sub gets set to 5, but when the program runs back to the main, or whatever sub the a variable was DIMmed in, it retains the value 3.
Of course it could be other things, but this just came to mind. Sometimes in a lot of code, it just takes one simple continuity mistake to make a problem.
Pete
-
as Steve said, we need the code.
If you want definitive help with this issue we need to see your code, otherwise we are shooting in the dark.
-
Me aveetar spends half of its time shootin in the dark, varmint!
-
I guess the issue resolved itself.