Page 6 of 6

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

Posted: Wed Sep 23, 2015 5:37 pm
by Rinnegatamante
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 ).

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

Posted: Wed Sep 23, 2015 8:44 pm
by MyLegGuy
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!

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

Posted: Wed Sep 23, 2015 9:29 pm
by Ervilha
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)	

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

Posted: Thu Sep 24, 2015 12:06 am
by Rinnegatamante
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 ;)

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

Posted: Thu Sep 24, 2015 9:26 am
by darkschnitzel
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!

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

Posted: Thu Sep 24, 2015 1:55 pm
by Ervilha
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.

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

Posted: Thu Sep 24, 2015 2:11 pm
by darkschnitzel
@Ervilha
Thank you that was my problem :)

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

Posted: Tue Sep 29, 2015 7:26 pm
by Dryon
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 ?

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

Posted: Tue Sep 29, 2015 9:03 pm
by Rinnegatamante
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.