D 
		
				
			
		Deleted member 103
Guest
Hi,
why are these errors triggered?
What can be wrong with my code?
		
		
	
	
		
	 
My code looks like this.
Starter-Service:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
Main-Activity:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
Activity-mSatellites:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
			
			why are these errors triggered?
What can be wrong with my code?
My code looks like this.
Starter-Service:
			
				B4X:
			
		
		
		Sub GPS1_GpsStatus (Satellites As List)
    Dim Set As Int = 0
    For i = 0 To Satellites.Size -1
        Dim GPSSat As GPSSatellite
        GPSSat = Satellites.Get(i)       
        If GPSSat.UsedInFix Then Set = Set + 1
    Next
   
    If Not(IsPaused(Main)) Then
        CallSub2(Main, "ShowGpsStatus", Set)
       
    else if Not(IsPaused(mSatellites)) Then
        CallSub2(mSatellites, "GpsStatus", Satellites)
       
    End If
End Sub
	Main-Activity:
			
				B4X:
			
		
		
		Public Sub ShowGpsStatus (Satellites As Int)
    If Starter.manager.GetString("lstClockSynchModus") = "GPS" Then
        imgGPSStatus.Visible = True
        If Satellites < 3 Then
            imgGPSStatus.Bitmap=LoadBitmap(File.DirAssets,"stat_sys_gps_off.png")
        Else if Satellites < 7 Then
            imgGPSStatus.Bitmap=LoadBitmap(File.DirAssets,"stat_sys_gps_on-50.png")
        Else
            imgGPSStatus.Bitmap=LoadBitmap(File.DirAssets,"stat_sys_gps_on-100.png")
        End If
    End If
End Sub
	Activity-mSatellites:
			
				B4X:
			
		
		
		Sub GpsStatus (Satellites As List)
    Dim i,set As Int
    Dim txt1, txt2, txt3, txt4, txt5 As String
   
    set=0
    txt1 = "Index"
    txt2 = "Azimuth"
    txt3 = "Elevation"
    txt4 = "Used"
    txt5 = "S / N ratio"
    lblSatellitesNb.Text = "Nb. of satellites: " & Satellites.Size
    lblSatellitesValid.Text = "Valid satellites: " & set
    For i = 0 To Satellites.Size -1
        Dim GPSSat As GPSSatellite
        GPSSat = Satellites.Get(i)
        txt1 = txt1 & CRLF & (i + 1)
        txt2 = txt2 & CRLF & GPSSat.Azimuth
        txt3 = txt3 & CRLF & GPSSat.Elevation
        txt4 = txt4 & CRLF & GPSSat.UsedInFix
        txt5 = txt5 & CRLF & NumberFormat(GPSSat.Snr, 1, 2)
       
        If GPSSat.UsedInFix Then set = set + 1
    Next
    lblSatellitesValid.Text = "Valid satellites: " & set
    lblSatellitesIndex.Text = txt1
    lblSatellitesAzimuth.Text = txt2
    lblSatellitesElevation.Text = txt3
    lblSatellitesUsed.Text = txt4
    lblSatellitesS_N.Text = txt5
End Sub