QB64.org Forum

Active Forums => Programs => Topic started by: gabrilesi95 on December 30, 2020, 06:22:04 am

Title: I have an issue.
Post 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.)
Title: Re: I have an issue.
Post by: SMcNeill on December 30, 2020, 06:38:53 am
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.
Title: Re: I have an issue.
Post by: bplus on December 30, 2020, 11:04:28 am
+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 :)
Title: Re: I have an issue.
Post by: Pete on December 30, 2020, 12:52:46 pm
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
Title: Re: I have an issue.
Post by: Cobalt on January 01, 2021, 12:36:21 pm
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.
Title: Re: I have an issue.
Post by: Pete on January 08, 2021, 09:30:38 pm
Me aveetar spends half of its time shootin in the dark, varmint!
Title: Re: I have an issue.
Post by: SpriggsySpriggs on January 15, 2021, 11:28:59 am
I guess the issue resolved itself.