I have created a new project and basically copied code from this site.
As much as I go over it and search here I can't see what I am doing wrong.
Line 42 is constantly underlined in red with this error.
As much as I go over it and search here I can't see what I am doing wrong.
Line 42 is constantly underlined in red with this error.
Error occurred on line: 42
Dim tmp As Object = ftp.UploadFile(File.DirDefaultExternal, "some.jpg", False, "/LaraImages/uploads/")
Word: )
B4X:
#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Private xui As XUI
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
Dim ftp As FTP
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
ftp.Initialize("ftp","xxxx.com",21,"xxxx_tony","xxxx")
ftp.PassiveMode = True
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
xui.MsgboxAsync("Hello world!", "B4X")
Dim tmp As Object = ftp.UploadFile(File.DirDefaultExternal, "some.jpg", False, "/LaraImages/uploads/")
Wait For (tmp) FTP_UploadCompleted (ServerPath As String, Success As Boolean)
If Success Then
MsgboxAsync( "Image successfully uploaded.", "Upload Success" )
Else
ToastMessageShow( "Image failed to upload!", True )
End If
End Sub