Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology
Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered
You are not logged in.
Offline
Iri what I mean is that the NOBODY flag create a erquest to the server where it return only header information.
This is made for this, so this is really fast since the server do not send the body information with the datas
Offline
_createpack can not create a file with a nil content. It's a logical behavior.
i think you make your code a bit complex.
mutate is an imperative Scol function : it changes directly in memory the value of a variable. Thus, it is also dangerous.
To use it, a variable must be in a tuple, even if its size is 1. This is one of the most difficult to understand functions, in Scol.
Unfortunately, i don't write an english tutorial yet about it. I can give you my short and old french explanation :
Mutate
'mutate' est une fonction très utile mais aussi très dangeureuse car c'est une fonction impérative dans un environnement fonctionnel. Elle remplace certains (voire tous les) éléments d'un tuple sans toucher aux autres, directement au niveau des pointeurs. Par exemple, le tuple
let ["a" "c" "c"] -> tuple in
...
mutate tuple <- [_ "b" _];On a remplacé la valeur du 2e élément : de "c" elle est passée à "b". Le tuple vaut désormais ["a" "b" "c"]. Là où il y a des undescores, les éléments restent inchangés. Remarquez également le sens de la "flèche", de la gauche vers la droite, ce qui est logique.
Bien sur, le typage du tuple doit être respecté ! mutate <- [_ 2 _] provoquera une erreur ! Autre exemple :let [a b c] -> tuple in
let 2*b -> d in
...
mutate <- [a d _];Ici, on a un tuple composé de trois variables a, b et c. On a une autre variable, d, définit comme valant le double de b (ce qui implique que b est un entier donc de type I, le type de a et c restant indéterminé).
Puis on remplace le 2e élément du tuple par d, comme lors du premier exemple. Mais on a aussi remplacé le 1er élément par la même variable. Si la vairable a n'a pas subi de traitement entre temps, le 1er élément restera inchngé sinon il sera modifié. De plus, 'mutate' modifie toutes les variables qui pointent directement ou non vers le tuple. C'est parfois très utile, c'est parfois très dangereux ...Note : 'mutate' ne fonctionne qu'avec des tuples. Pour modifier une variable unique, il faut la placer dans un tuple de taille 1 :
let [mavariable] -> tuple in
...
mutate tuple <- [mavariable];Cela peut paraître idiot (on pourrait modifier directement 'mavariable' mais dans un certain nombre de cas, c'est la seule solution !
Offline
Iri what I mean is that the NOBODY flag create a erquest to the server where it return only header information.
This is made for this, so this is really fast since the server do not send the body information with the datas
Yes, i understand. But my question is not here
You want download a file, so you perform a GET request.
If you make before a HEAD request, you've two requests instead of one. Although this data is also known in the GET header response.
Offline
You can update :
https://svn.scolring.org/trunk/scol_app … /tools.pkg
https://svn.scolring.org/trunk/scol_app … player.pkg
to test create a scol file like :
_load "tools/os3dplayer/os3dload.pkg"
main "http://ifam.net/openspace/spacemanshooter1/dan_no_mohawk/spacemanwithtank.pak" "" "" "" 0
Offline
Offline
the code works with _createpak or _storepack, for what that's worth. I'm not sure why the last parameter of INETGetURL makes things different as the relevant object destpath is being passed to the callback.
no need to answer, it works, that's all I need to proceed at this point
Offline
Yes iri you get this info in the simple get request too, but this request end only when the all file is downloaded.
So with this one you get the data size before to send the download request. it can also permit to check the file difference with size and date from the local one before downloading it.
Offline
I think you forgot to clean the file before download it again.
just call _storepack "" thefile; to make it empty. the pak format allow bad data after the correct one, but the file size must grow for nothing, and only the first data in file will be loaded.
Try my code it all work good
Offline
I think you forgot to clean the file before download it again.
just call _storepack "" thefile; to make it empty. the pak format allow bad data after the correct one, but the file size must grow for nothing, and only the first data in file will be loaded.Try my code it all work good
Ok please share when you have time.
Offline
You can update :
https://svn.scolring.org/trunk/scol_app … /tools.pkg
https://svn.scolring.org/trunk/scol_app … player.pkgto test create a scol file like :
_load "tools/os3dplayer/os3dload.pkg" main "http://ifam.net/openspace/spacemanshooter1/dan_no_mohawk/spacemanwithtank.pak" "" "" "" 0
Oops I miss that. I will get back to work on it in the morning thanks!!!!!!
Offline
Yes iri you get this info in the simple get request too, but this request end only when the all file is downloaded.
So with this one you get the data size before to send the download request. it can also permit to check the file difference with size and date from the local one before downloading it.
Offline
arkeon I tried out your code and for some reason it slows the player startup. I don't know why. In any case, thank you for your update as I will be using the download bar in my project.
Offline
the other code is the same so it should not slow down the startup, and the downloading method is better than the inet one. It use the OS3D 1.8beta runtimes, maybe I made some other changes I don't remember ^^
Offline
the other code is the same so it should not slow down the startup, and the downloading method is better than the inet one. It use the OS3D 1.8beta runtimes, maybe I made some other changes I don't remember ^^
I see, that's probably it.
Offline
You can download the last scol and OS3D version here :
https://svn.scolring.org/trunk/setups/i … plugin.exe
then
https://svn.scolring.org/trunk/setups/i … _setup.exe
This is not the final one but it has a lot of new features
(the player code is not updated with the one from yesterday in this version)
Offline
You can download the last scol and OS3D version here :
https://svn.scolring.org/trunk/setups/i … plugin.exethen
https://svn.scolring.org/trunk/setups/i … _setup.exe
This is not the final one but it has a lot of new features
(the player code is not updated with the one from yesterday in this version)
Thanks! atm I think I will hold off on trying everything with the next version, unless you want me to do some testing for you.
Offline