Closed modz2014 closed 7 years ago
Your code looks completely faulted. Check it again.
-- Initializing Network Network.init()
-- Checking if connection is available if Network.isWifiEnabled() then
-- Download an image
Network.downloadFile("http://rinnegatamante.it/site/images/logo.png", "ux0:/data/data.png")
-- Loading image in memory and deleting it from storage
img = Graphics.loadImage("ux0:/data/data.png")
System.deleteFile("ux0:/data/data.png")
end
-- Terminating network Network.term()
-- Main loop while true do
-- Drawing the downloaded image
Graphics.initBlend()
Screen.clear()
if img == nil then
Graphics.debugPrint(5,220,"You must enable WiFi to use this sample.", Color.new(255,255,255))
Graphics.debugPrint(5,240,"Press TRIANGLE to return to the sample selector", Color.new(255,255,255))
else
Graphics.drawImage(200,265,img)
Graphics.debugPrint(5,220,"This image came from http://rinnegatamante.it/site/images/logo.png", Color.new(255,255,255))
Graphics.debugPrint(5,240,"Press TRIANGLE to return to the sample selector", Color.new(255,255,255))
end
Graphics.termBlend()
Screen.flip()
-- Exit check
if Controls.check(Controls.read(), SCE_CTRL_TRIANGLE) then
if img ~= nil then
Graphics.freeImage(img)
end
img = nil
break
end
end
your one for example in there doesn't not work either error line 2
-- Checking if connection is available if Network.isWifiEnabled then
-- Download PUP
Network.downloadFile("https://www.dropbox.com", "ux0:/app/image.img")
end
if System.doesFileExist("ux0:/uriCall_list.txt")==false then System.launchEboot("app0:devkit.bin")
end
don't worry about where I downloading it from and too just don't get why there is errors
Or what's the lines for moving a file scr to dest path
I still don't get what's the problem, you're spamming random stuffs badly formatted that are hard to understand.
Btw, you're trying to download dropbox home (?) for what purpose? Also, according to the fact you're trying to save the result on ux0:/app, i suppose you're using the unsafe build cause if not, safe build can write only on ux0:/data.
Yes of cause unsafe don't worry about what I'm Dowloading I'm asking if it's right coz I get error at line too
If It can't be done is there away for moving a file
What error?
Line two errror look at your same code for downloading image it's the same error
The sample works fine and since you dont want to cooperate, i cant help you.
I said I'm trying to create a script to download a file from dropbox then save it to a path ive tried heaps of was using http but I keep getting errors
hi I'm trying to download a file using this
-- Checking if connection is available if Network.isWifiEnabled() then
I have the other things sort but when I run it gives me error line 2 is there a different line to download a file