Rinnegatamante / lpp-vita

Lua Player Plus for PSVITA. Documentation on: http://rinnegatamante.github.io/lpp-vita/
GNU General Public License v3.0
180 stars 27 forks source link

trying to display progress bar #21

Closed modz2014 closed 7 years ago

modz2014 commented 7 years ago

hi man sorry about before in the other one I was trying to rush I will explain better this sorry please help me this is my code below

-- Starting progressbar message System.setMessage(".\nPlease wait...", true) if System.doesFileExist("app0:/ud0_files.zip")==true then System.deleteDirectory("ud0:/") System.extractZIP("app0:ud0_files.zip", "ud0:/")

as you can see I'm trying to display a progress showing me when extracting the bar doesn't show but when I change if System.doesFileExist("app0:/ud0_files.zip")==true then to ==false then it display the progress bar but nothing gets extracted of course I think its a bug I'm not sure hopefully you can help me sorry one again about before

Rinnegatamante commented 7 years ago

Your code doesn't even render something on screen, that means a system message won't be rendered too. Also, your code is faulty by default since the if clause is never closed resulting in a syntax error on script launch.

modz2014 commented 7 years ago

would you like me to post the hole code ill upload it to hastebin

modz2014 commented 7 years ago

https://hastebin.com/hubumapixu.lua

Rinnegatamante commented 7 years ago

extractZIP is a synchronous function, you can't bind a system message to a ZIP extraction.

CelesteBlue-dev commented 7 years ago

@Rinnegatamante Could you make it async please ? I mean maybe with a callback. I think I saw extractZipCB in ONELUA.

Rinnegatamante commented 7 years ago

Asynchronous functions will be added in the future for several tasks for sure.

modz2014 commented 7 years ago

so I cant do anything with this then until you update it

Rinnegatamante commented 7 years ago

Added with https://github.com/Rinnegatamante/lpp-vita/commit/94a61db265b45d9f95e258ba1cfd116271aac5bb