Hello guys,
I've been using BAS for over a year now, and i got years of programming experience.
So it's for me not too hard to understand how "functions" work in BAS. Which is basically the same thing in programming language. Using some often repeated logic in a function with parameters and possible return of data/booleans etc.
But for some reason (I don't know if it's recent or always been the case). I have a function, which still does actions AFTER the return function.
I can understand it doesn't work the same when your just doing "run next action" instead of the play button which handles the function call properly.
But i've tested it by playing it and adding logs behind the return function(As there is a log before the false return statement). So that i am sure nothing goes wrong.
I am sure there is some issue with the return/function "function". Because in the same function there are 2-3 dead point checks where it will stop the function and return X.
And yep, my logs show both log before and after the return function. (On more then just 1 dead point). They have different logs so i could differentiate between the return function calls.
So for whatever reason it's not stopping the function and returning the data to the function caller.
The only thing that i can think that may bring some "confusion or maybe bugs somehow".
Is that the logic is inside "some kind of loop".
IF the logic fails, it will retry a few times (by using move to label, all inside the same function!)
and after that it will return false (and expecting the function to end there. But it doesnt).
The randomized "loop" varies between 4 and 7 times. "iterator count" --> 56 :')
It's very strange, because often when the function is called, and it reaches the return point, it actually returns. Even on the so called "dead points".
Is this some incosistency due to some bug? Should i just ignore it? Have a temporary workaround so it doesn't put my script in a endless loop? Something that happens only in record mode? Technical issues? Lack of RAM?
Functions is a powerfull feature that should be function well. So i thought i could atleast share this. Hopefully we're on to something. Or even better, hopefully it is just me. But then i need to know what is the reason why it is not returning as expected. I can understand BAS functions differ somewhere with functions in other languages. Atleast i can't tell from function description.
Kind regards