Compiler Error with 1.5

skizzo

Member
Licensed User
Longtime User
Hi Erel and agraham look at this code. It does not work with new version of B4A.
Thanks in advance.
 

Attachments

  • eismann_new ver 1.0-28-04-11_2.zip
    32.5 KB · Views: 201

agraham

Expert
Licensed User
Longtime User
Interestingly compiled with Alt+2 it doesn't error but compiled by pressing Alt+1 or the Run button it does - I wonder what the difference is as both produce an apk.:confused:

You have a Global Lista already declared and are redeclaring it as a local but the B4A compiler doesn't seem to be catching it. I wonder whether Erel regards this as legal or not? You can reDim other variables to get a fresh instance of them so why not a Global List?
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
When compiling for the debugger the Basic4android compiler inserts code that identifies the line being executed and which local variables a Sub uses. In this case because of the "Dim" it is assuming that a global variable is in fact a local one and that is causing the error.
 
Upvote 0
Top