Advertising (This ad goes away for registered users. You can Login or Register)

Lua Player Plus VITA (lpp-vita) - Lua interpreter for PSVITA

Submit here your entries for the Revitalize Competition. Deadline is September 30th.
Rules can be found here: http://wololo.net/revitalize/
User avatar
Rinnegatamante
VIP
Posts: 742
Joined: Sat Mar 26, 2011 10:02 am
Contact:

Re: Lua Player Plus VITA (lpp-vita) - Lua interpreter for PS

Post by Rinnegatamante » Wed Sep 23, 2015 5:37 pm

Try the velf i sent you through PM for FCREATE fix.

Don't know if table.maxn still exists on lua 5.3 anyway to get number of elements for a table you have to do something like this:

Code: Select all

number_of_elements = #my_table
listDirectory returns three info for each scanned file (name = name of file, directory = boolean saying if file is a file or a directory, size = size of file).

For a practical sample of its usage you can see menu sample ( https://github.com/Rinnegatamante/lpp-v ... u/menu.lua ).
Advertising
If you want, visit my website: http://rinnegatamante.it :D

User avatar
MyLegGuy
Posts: 140
Joined: Sat May 16, 2015 10:40 pm
Location: United States

Re: Lua Player Plus VITA (lpp-vita) - Lua interpreter for PS

Post by MyLegGuy » Wed Sep 23, 2015 8:44 pm

Rinnegatamante wrote:Try the velf i sent you through PM for FCREATE fix.

Don't know if table.maxn still exists on lua 5.3 anyway to get number of elements for a table you have to do something like this:

Code: Select all

number_of_elements = #my_table
listDirectory returns three info for each scanned file (name = name of file, directory = boolean saying if file is a file or a directory, size = size of file).

For a practical sample of its usage you can see menu sample ( https://github.com/Rinnegatamante/lpp-v ... u/menu.lua ).
Thank you very much!
I was able to get the names of the files a directory, and FCREATE works now!
Advertising
please reply

Ervilha
Posts: 4
Joined: Wed Sep 16, 2015 11:10 am

Re: Lua Player Plus VITA (lpp-vita) - Lua interpreter for PS

Post by Ervilha » Wed Sep 23, 2015 9:29 pm

I would like to make a small suggestion for the default menu.
The menu lists all files and folders inside the lpp folder but only launches the .lua files,
so if a homebrew has multiple files we need to make another folder elsewhere and put the loading script inside the lpp folder.
For those cases I think it would be better to just have one folder inside the lpp with all files and a index.lua
and on the menu script check if the files inside the lpp are folders and if so try to launch the index.lua inside.

Code: Select all

file = "cache0:/lpp/" .. scripts[i].name

if scripts[i].directory and System.doesFileExist(file .. "/index.lua") then
	file = file .. "/index.lua"
end

dofile(file)	

User avatar
Rinnegatamante
VIP
Posts: 742
Joined: Sat Mar 26, 2011 10:02 am
Contact:

Re: Lua Player Plus VITA (lpp-vita) - Lua interpreter for PS

Post by Rinnegatamante » Thu Sep 24, 2015 12:06 am

Ervilha wrote:I would like to make a small suggestion for the default menu.
The menu lists all files and folders inside the lpp folder but only launches the .lua files,
so if a homebrew has multiple files we need to make another folder elsewhere and put the loading script inside the lpp folder.
For those cases I think it would be better to just have one folder inside the lpp with all files and a index.lua
and on the menu script check if the files inside the lpp are folders and if so try to launch the index.lua inside.

Code: Select all

file = "cache0:/lpp/" .. scripts[i].name

if scripts[i].directory and System.doesFileExist(file .. "/index.lua") then
	file = file .. "/index.lua"
end

dofile(file)	
I like your idea, i'll adopt it in next releases ;)
If you want, visit my website: http://rinnegatamante.it :D

darkschnitzel
Posts: 14
Joined: Fri Aug 09, 2013 12:49 pm

Re: Lua Player Plus VITA (lpp-vita) - Lua interpreter for PS

Post by darkschnitzel » Thu Sep 24, 2015 9:26 am

Hi, I tried to port an old psp lua game, i have written a few years ago.
I can't find the error but somehow the Vita says: An error occured, Vita will now power off.
Is it a problem with my code or with your Programm?
Thanks
P.S. Nice homebrew, I love it!

Ervilha
Posts: 4
Joined: Wed Sep 16, 2015 11:10 am

Re: Lua Player Plus VITA (lpp-vita) - Lua interpreter for PS

Post by Ervilha » Thu Sep 24, 2015 1:55 pm

darkschnitzel wrote:Hi, I tried to port an old psp lua game, i have written a few years ago.
I can't find the error but somehow the Vita says: An error occured, Vita will now power off.
Is it a problem with my code or with your Programm?
Thanks
P.S. Nice homebrew, I love it!
I had the same problem, in my case the culprit was the drawing functions,
if you are passing decimal values to the drawing functions try to use math.floor(),
because some how if you use decimal values it will reboot your vita.

darkschnitzel
Posts: 14
Joined: Fri Aug 09, 2013 12:49 pm

Re: Lua Player Plus VITA (lpp-vita) - Lua interpreter for PS

Post by darkschnitzel » Thu Sep 24, 2015 2:11 pm

@Ervilha
Thank you that was my problem :)

User avatar
Dryon
Posts: 11
Joined: Tue Mar 31, 2015 7:33 pm

Re: Lua Player Plus VITA (lpp-vita) - Lua interpreter for PS

Post by Dryon » Tue Sep 29, 2015 7:26 pm

Hey, I managed to use your HB on psm unity, but everytime I stop the FTP, wether on the Vita or when disconnecting Filezilla on my pc, PSM unity crash with error "C2-12828-1". It's annonying, 'cause I'm forced to restart whole homebrew just to test a fresh imported LUA script. Any idea on solution ?

User avatar
Rinnegatamante
VIP
Posts: 742
Joined: Sat Mar 26, 2011 10:02 am
Contact:

Re: Lua Player Plus VITA (lpp-vita) - Lua interpreter for PS

Post by Rinnegatamante » Tue Sep 29, 2015 9:03 pm

Dryon wrote:Hey, I managed to use your HB on psm unity, but everytime I stop the FTP, wether on the Vita or when disconnecting Filezilla on my pc, PSM unity crash with error "C2-12828-1". It's annonying, 'cause I'm forced to restart whole homebrew just to test a fresh imported LUA script. Any idea on solution ?
No solution right now, it's a common issue probably related to sceNet not properly working.
If you want, visit my website: http://rinnegatamante.it :D

Post Reply

Return to “Revitalize Competition”