Thanks for your reply Jcl,

yeah.. [face palm] I noticed the Url was wrong after I posted my question.. I thought I updated that.

I tried using an absolute path, and with no luck im still getting "error during download"
ftp_size becomes -1, and ftp_sent stays at 0.

Here is the updated code:
Code:
#define ADDRESS "ftp://www.host.com/model.mdl"
#define _PATH "E:/projectfolder/models/model.mdl"
#define USER "filezilla_user"
#define PASS "filezilla_pass"

void update_game(){
	ftp_debug(1);

	ftp_download(ADDRESS, _PATH, USER, PASS);
	while (!ftp_status()) //as long as the download is running
	{ //get informations about the download:
		fsize = ftp_size();
		fsent = ftp_sent();
		DEBUG_VAR(fsize, 100);
		DEBUG_VAR(fsent, 120);
		wait(1);
	} 
	if (ftp_status() == 1) 
	printf("Download successful!"); 
	else 
	printf("Error during download!"); 
}

function main(){

	update_game();
	wait_for(update_game);
        ...
}


Last edited by DLively; 04/24/15 13:13.

A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com