Android Question Compiler error help

HugoSX2

Member
Licensed User
Longtime User
I got a curious compiler error and need some help.

In the process_globals I did a 'Dim AStreams As AsyncStreams'

And in Activity_Pause I did 'If AStreams.IsInitialised then..'. This generates the Compiler error. Why?


 

eps

Expert
Licensed User
Longtime User
Can you post the code itself?

It says it's expecting a '('... it looks like a badly formed If statement, but it's a bit hard to help without seeing some of it!

you might need a blah.isinitialised = true in there...

or there's a missing bracket somewhere else...
 
Upvote 0

HugoSX2

Member
Licensed User
Longtime User
That's the code. I can not see any error.

B4X:
Sub Activity_Pause (UserClosed As Boolean)

    If UserClosed = True Then
       
        If AStreams.IsInitialized = True Then
            AStreams.Close
        End If

        ExitApplication
        Return
    End If

End Sub

Any other idea?
 
Upvote 0

HugoSX2

Member
Licensed User
Longtime User
I removed all unrelated code from my project - but the error is still there.

I hope you can reproduce it.
 

Attachments

  • Test.zip
    9.8 KB · Views: 122
Upvote 0

eps

Expert
Licensed User
Longtime User
Hugo, I think it's this definition that is causing the compile error :

B4X:
Sub AStreams( ABuffer() As Byte )                                 

End Sub

If you remove this, it works - are you sure the definition can be received like that into the Sub? Admittedly you are using a later version of B4A than I am.. I'll update this and see if this gives a different issue.
 
Upvote 0

HugoSX2

Member
Licensed User
Longtime User
That's it!! I forgot the '_NewData'. It must be 'AStreams_NewData('

But the error message is very confusing.

Thank you!
 
Reactions: eps
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…