Android Question Cannot cast type: {Type=Double,Rank=0, RemoteObject=True} to: {Type=Double,Rank=1, RemoteObject=True

shasunder

Member
Licensed User
Longtime User
Sub Get_1_Planet(JD As Double, p_num As Int) As Double
Dim xx(7) As Double
Dim serr As StringBuilder
Dim iflag As Int
Dim ret_flag As Int
Dim dss(7) As Double
Dim dss1 As StringBuilder = Null
serr.Initialize
For i = 1 To 255
serr.Append("0")
Next

iflag = 2 + 256

'this was suggested before I replaced StringBuffer with StringBuilder
'Select the Reflection Library
'Dim r As Reflector
'ret_flag = swe1.swe_calc_ut(JD, p_num, iflag, xx, r.CreateObject2("java.lang.StringBuffer",Array As Object(serr),Array As String("java.lang.String")))

ret_flag = swe1.swe_calc_ut(JD, p_num, iflag, xx, serr)
Dim rsGeoPos(2) As Double
rsGeoPos(0) = 78.9833333333333
rsGeoPos(1) = 10.2166666666667
rsGeoPos(2) = 0
ret_flag = swe1.swe_rise_trans(JD,0,dss1,0,1,rsGeoPos(0),0.0000,0.000,dss ,serr)

Return xx(0)
End Sub

Can some one please let me know what am i doing wrong?
 

Attachments

  • 1.png
    1.png
    12 KB · Views: 374
  • 2.png
    2.png
    41.2 KB · Views: 366

JordiCP

Expert
Licensed User
Longtime User
it is expecting an array in 6th parameter ( geopos() ) and you are sending just a value.
B4X:
ret_flag = swe1.swe_rise_trans(JD,0,dss1,0,1,rsGeoPos,0.0000,0.000,dss ,serr)
 
Upvote 0
Top