H HugoSX2 Member Licensed User Longtime User Sep 2, 2014 #1 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?
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 Sep 2, 2014 #2 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
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...
H HugoSX2 Member Licensed User Longtime User Sep 2, 2014 #3 That's the code. I can not see any error. Code: 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
That's the code. I can not see any error. Code: 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?
Erel B4X founder Staff member Licensed User Longtime User Sep 3, 2014 #4 Can you upload your project (File - Export as zip)? Upvote 0
H HugoSX2 Member Licensed User Longtime User Sep 3, 2014 #5 I removed all unrelated code from my project - but the error is still there. I hope you can reproduce it. Attachments Test.zip Test.zip 9.8 KB · Views: 247 Upvote 0
I removed all unrelated code from my project - but the error is still there. I hope you can reproduce it.
eps Expert Licensed User Longtime User Sep 3, 2014 #6 Hugo, I think it's this definition that is causing the compile error : Code: 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
Hugo, I think it's this definition that is causing the compile error : Code: 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.
eps Expert Licensed User Longtime User Sep 3, 2014 #7 Hmm... Can you define AStreams as a Sub and a SyncStream? That would seem to be the issue here. Upvote 0
H HugoSX2 Member Licensed User Longtime User Sep 3, 2014 #8 That's it!! I forgot the '_NewData'. It must be 'AStreams_NewData(' But the error message is very confusing. Thank you! Upvote 0
That's it!! I forgot the '_NewData'. It must be 'AStreams_NewData(' But the error message is very confusing. Thank you!