Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Check if a download has complete? (https://forums.graalonline.com/forums/showthread.php?t=76146)

DustyPorViva 08-06-2007 10:40 PM

Check if a download has complete?
 
Is there any function that checks when a download has finished? I know there's downloadpos and such, but it's hard to use stuff like getimgwidth/height when images haven't been downloaded yet.
So ya, any way to check when an image is downloaded? And no, I can't use any combination of downloadpos and such, as the image is too small.

Crow 08-06-2007 10:43 PM

Maybe try fileexists() clientside? I'm not sure if it works, but it might.

JkWhoSaysNi 08-07-2007 10:07 PM

You could put the images in a package so they have to be downloaded when someone logs on.

DustyPorViva 08-07-2007 10:52 PM

Ya, I was thinking of doing that.

Admins 08-09-2007 08:55 PM

I think getimgwidth() is forcing the download of the image, so once it is not zero anymore then it finished downloading.

There are various functions for checking the download of files:
isdownloading(filename) - boolean, checks if a file is currently downloading
isdownloadingfiles() - bool
downloadfile - string
lastdownloadfile - string
downloadpos - integer
downloadsize - integer
fileexists(filename) - bool
filesize(filename) - integer
fileupdate(string) - bool


All times are GMT +2. The time now is 02:09 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.