Tremidinha Posted November 28, 2012 Share 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? Link to comment
Anderl Posted November 28, 2012 Share 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? Link to comment
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