Best-Killer Posted January 20, 2017 Posted January 20, 2017 hello guys please an example of FetchRemote Client Side please (images remote ) i tried with that but it's not work addEventHandler("onClientResourceStart", resourceRoot, function() local f = fetchRemote("https://www.countries-ofthe-world.com/flags-normal/flag-of-Germany.png", function(data, err) if(err == 0) then local f = fileCreate(v[3]) fileWrite(f, data) fileClose(f) outputChatBox("Passed") else outputChatBox("error") end end, "", false) end)
pa3ck Posted January 20, 2017 Posted January 20, 2017 Note: Client side function only works with the server the player is connected to or it will return the error #1006 1
MrDante Posted January 20, 2017 Posted January 20, 2017 Ok, but is the algorithm "v[3]" catching a table ?
Best-Killer Posted January 20, 2017 Author Posted January 20, 2017 18 hours ago, pa3ck said: Note: Client side function only works with the server the player is connected to or it will return the error #1006 but i don't enderstand it 6 hours ago, MrDante said: Ok, but is the algorithm "v[3]" catching a table ? ye it's catching table
Moderators IIYAMA Posted January 20, 2017 Moderators Posted January 20, 2017 (edited) What is the errno it returns? Edited January 20, 2017 by IIYAMA
Best-Killer Posted January 20, 2017 Author Posted January 20, 2017 Client side function only works with the server the player is connected to it's means the featchremote only from server ip right ?? and if my server is localhost what should ip i use to make it work ??
Moderators IIYAMA Posted January 20, 2017 Moderators Posted January 20, 2017 (edited) Why don't you use both sides? Request clientside > trigger > serveride download > trigger > clientside write file. Else you can better use the downloadFile function. downloadFile Edited January 20, 2017 by IIYAMA 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now