Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
dbellis
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 18th Sep 2002 21:56
Have alook at this code as it keeps giving me a cant return to nest error but i dont think anyhing rong with it any idears
[Code]
_Connect
cls : print "FTP Connection"
ftp connect url$,user$,pass$
if get ftp failure()=0
print "Connection Established"
gosub _Main_Dir_files
else
print "Could Not Establish Connection
print "Error: ";get ftp error$()
waitkey
goto _New_Connection
endif
return

_Main_Dir_Files:
cls : print "FTP Main Dir Files"
if get ftp status()=1
print "FTP DIR: ";get ftp dir$();"..." : sync
ftp find first
while get ftp file type() -1
print "TYPE: "get ftp file type();
print "Name: "get ftp file name$();
print "Size: "get ftp file size()
sync
endwhile
endif
return


what the hell is rong with that
http://www.eclipsedevelopment.co.uk/
Succession The Betrayal Developer
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 18th Sep 2002 22:02
you are breaking out of the first if with a goto, it never gets a chance to resolve it with endif. probably causing problems later on down the line

Zep--

dbellis
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 19th Sep 2002 00:58
The goto only is executed if the command fails so the program should still compile without the return the code would get to messy

http://www.eclipsedevelopment.co.uk/
Succession The Betrayal Developer
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 19th Sep 2002 01:04
um, how about this then

instead of:
while get ftp file type() -1

try
while get ftp file type() = -1

Zep--

Login to post a reply

Server time is: 2024-04-20 02:16:01
Your offset time is: 2024-04-20 02:16:01