Tremidinha Posted November 28, 2012 Posted November 28, 2012 Hi I have a problem with the function fetchRemote. I hope you can help me. Server Side: function startImageDownload( playerToReceive ) fetchRemote ( "www.exemple.com/exemple.png", myCallback, "", false, playerToReceive ) end addCommandHandler("down",startImageDownload) function myCallback( responseData, errno, playerToReceive ) if errno == 0 then triggerClientEvent( playerToReceive, "onClientGotImage", resourceRoot, responseData ) end end Client Side: addEvent( "onClientGotImage", true ) addEventHandler( "onClientGotImage", resourceRoot, function( pixels ) local file = fileCreate( pixels..".png" ) if ( file ) then outputChatBox("Test") fileWrite( file, pixels ); fileClose( file ); end end ) I think the code is right but there appears no error and the file is not created, someone could help me or explain to me why this happens? Email - [email protected] Skype - mattheusxdx
Anderl Posted November 28, 2012 Posted November 28, 2012 Didn't I just tell you million times that it's not: pixels .. ".png" But: "file.png" ? Is it that hard to understand that? "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
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