Questions regarding ftp_download

Posted By: DLively

Questions regarding ftp_download - 05/07/14 05:06

Hello again laugh
I am using the manuals example to get myself going with this feature, however i am having difficulty with doing so.

I've added everything correctly, except for 2 possibilities - the address or path - but both are correct afaik.

I've tried ftp_debug(1);
but I get the "Error during Download" printf
and then the engine crashes.

Commented out I still get the same error, but no crash.

Code:
STRING* UPDATE_ADRS = "ftp://host.net/gamefolder/updates/playermodel.mdl";
STRING* UPDATE_MODEL = "3dmodels/Player.mdl";
STRING* CLI_NO = "...";//both are correct
STRING* CLI_PA = "...";//^^^

void update_game(){
	ftp_download(UPDATE_ADRS,UPDATE_MODEL,CLI_NO,CLI_PA); 
	while (ftp_status()==0) //as long as the download is running
	{ //get informations about the download:
		//ftp_debug(1);
		fsize = ftp_size();
		fsent = ftp_sent();
		//set(DEBUG_PAN,SHOW);
		//globalvar = 0;
		wait(1);
	} 
	if (ftp_status() == 1){printf("Download successful!");}
	else{printf("Error during download!");}
}



Im not sure whats up from here... Or does this only work with a published version?? - I created a resource file and got the acknet.dll and placed it in my project folder with no luck either.

Any Suggestions?
Posted By: Ch40zzC0d3r

Re: Questions regarding ftp_download - 05/07/14 09:37

You shouldnt provide the password to the suer o.0
Use another function to download from http without the need of a username and password shocked
Maybe use a library or something but never get out your ftw credentials!
Posted By: DLively

Re: Questions regarding ftp_download - 05/07/14 11:47

Good suggestion! Just learning these new functions, Thank you laugh
Posted By: DLively

Re: Questions regarding ftp_download - 05/07/14 12:23

Hmmm... can this be done with the http_ commands? Does't seen that way, unless it requires more work - Then I could see it possible.. but Im still not sure which route to go at this moment...
Posted By: Ch40zzC0d3r

Re: Questions regarding ftp_download - 05/07/14 13:52

If you have problems doing this in lite-c then dont stay too long without plugins.
Just code your own plugin with visual c++, its not hard, you can use the standard project file and google how to download files from your http link with c++ laugh
Posted By: DLively

Re: Questions regarding ftp_download - 05/07/14 19:40

Thanks for the encouragement and tip, Ch40zzC0d3r! I am going to look into that for sure laugh I will let you know my progress ^_^
Posted By: DLively

Re: Questions regarding ftp_download - 05/08/14 03:10

Which version am I supposed to be using?
Posted By: DLively

Re: Questions regarding ftp_download - 05/08/14 03:40

lol. Frustrating comes to mind when trying to find out how to get started on google......................................................
© 2024 lite-C Forums