Zeige Ergebnis 9.211 bis 9.240 von 10238
Lua Programming Help Thread
This is a discussion on Lua Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Simply, put it out of the function?...
-
08-12-2008, 04:40 PM #9211Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Simply, put it out of the function?
-
08-12-2008, 08:27 PM #9212QJ Gamer Blue
- Registriert seit
- Apr 2008
- Beiträge
- 497
- Points
- 4.268
- Level
- 41
- Downloads
- 0
- Uploads
- 0
just a quick question what is the largest image you can load in lua??
-
08-12-2008, 08:33 PM #9213lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
512x512 AFAIK
-
08-12-2008, 08:47 PM #9214QJ Gamer Blue
- Registriert seit
- Apr 2008
- Beiträge
- 497
- Points
- 4.268
- Level
- 41
- Downloads
- 0
- Uploads
- 0
just checking
AFAIK = As Far As I Know?????
and thanks I do appreciate it. . . .
-
08-12-2008, 08:56 PM #9215lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
Yea.
As far as i know
-
08-13-2008, 01:48 AM #9216Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
it actually depends on which lua player you use but the max for the origional lua player is 512 x 512, but you shouldnt load large images if you can help it.
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
08-13-2008, 02:02 AM #9217QJ Gamer Bronze

- Registriert seit
- Jul 2006
- Beiträge
- 550
- Points
- 5.381
- Level
- 47
- Downloads
- 1
- Uploads
- 0
No LuaPlayer can load images larger than 512x512.
It's a hardware limitation.
-
08-13-2008, 02:05 AM #9218Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
LuaPlayerHM CAN load images larger than 512 x 512, it just cant blit them to the screen!
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
08-13-2008, 07:04 AM #9219QJ Gamer Blue
- Registriert seit
- Apr 2008
- Beiträge
- 497
- Points
- 4.268
- Level
- 41
- Downloads
- 0
- Uploads
- 0
ok, so if 512 by 512 is the larges image you can load, what is the largest image you can create in lua???
-
08-13-2008, 07:58 AM #9220Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
the same 512 x 512
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
08-13-2008, 08:01 AM #9221QJ Gamer Blue
- Registriert seit
- Apr 2008
- Beiträge
- 497
- Points
- 4.268
- Level
- 41
- Downloads
- 0
- Uploads
- 0
ok, cool, I fixed it, didn't need images that big anyway, lo lI was just doing it wrong. . . . but thanx for the help.
Geändert von PSProgramer (08-13-2008 um 09:37 AM Uhr) Grund: Automerged Doublepost
-
08-13-2008, 11:47 AM #9222QJ Gamer Blue
- Registriert seit
- Dec 2007
- Ort
- dfgd
- Beiträge
- 66
- Points
- 4.008
- Level
- 40
- Downloads
- 0
- Uploads
- 0
hi all, im wondering if anybody knows how to list a directory and print it to the screen so then i can have a selector on it aswell.
for like loading a game save, i know this might be really simple bu i cannot think 100% right now so i was wondering if ant of you lot wwould know?
luke
-
08-13-2008, 11:56 AM #9223QJ Gamer Blue
- Registriert seit
- Apr 2008
- Beiträge
- 497
- Points
- 4.268
- Level
- 41
- Downloads
- 0
- Uploads
- 0
EDIT:Nvrmind. . .
oo and luke what exactly are you asking?? how you would save and load a game??
-
08-13-2008, 12:11 PM #9224Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
08-13-2008, 12:14 PM #9225QJ Gamer Blue
- Registriert seit
- Apr 2008
- Beiträge
- 497
- Points
- 4.268
- Level
- 41
- Downloads
- 0
- Uploads
- 0
well i have a problem cause I need to move the secound layer, buit I'll work with it and see what I can come up with. . . . .
-
08-13-2008, 12:42 PM #9226QJ Gamer Blue
- Registriert seit
- Dec 2007
- Ort
- dfgd
- Beiträge
- 66
- Points
- 4.008
- Level
- 40
- Downloads
- 0
- Uploads
- 0
Nonono lol not all that lol Oh god no,i have full saving and loading code which i created myself

what i was asking you was how to list scripts from a folder and print there names to the screen like in lowser it lists all the scripts and then if you press X its loads that script well i need something where it loads all the saved game into like a big menu like lowser and then you select your game via moving to it and press X then it will load it.
do you get me now? maybe? :S
Luke:Argh:
-
08-13-2008, 01:17 PM #9227Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
go to my site and look at the menu examples in the code section
http://psp-networks.ath.cx/
the main commands you need are
System.currentDirectory()
System.listDirectory()
and
table.getn()------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
08-13-2008, 01:23 PM #9228Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
to list everything in a directory
That's who i think u do it.Code:list = System.listDirectory("mso:/") screen:print(0.10.list, red)
-
08-13-2008, 01:30 PM #9229Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Code:white = Color.new(255, 255, 255) list = System.listDirectory() saves = table.getn(list) while true do screen:clear(white) for i = 3, saves do screen:print(10, 30 + ((i - 3) * 10), list[i].name) end screen.flip() screen.waitVblankStart() endGeändert von FaT3oYCG (08-13-2008 um 01:53 PM Uhr)
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
08-13-2008, 01:35 PM #9230QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
dan, stop saying thats how i think you do it when you really have no clue.
fatboy has it right although I would do table.remove(list,1) 2x to drop the . and .. options if its just for picking a savefile in the directory
-
08-13-2008, 01:37 PM #9231QJ Gamer Platinum
- Registriert seit
- Feb 2006
- Ort
- National Front Disco
- Beiträge
- 13.057
- Points
- 66.627
- Level
- 100
- Downloads
- 0
- Uploads
- 0
-
08-13-2008, 01:46 PM #9232lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
-
08-13-2008, 01:49 PM #9233QJ Gamer Platinum
- Registriert seit
- Feb 2006
- Ort
- National Front Disco
- Beiträge
- 13.057
- Points
- 66.627
- Level
- 100
- Downloads
- 0
- Uploads
- 0
Sure, he's wrong, but if all you are going to do is sit back and tell him he is doing it wrong without any sort of input or correction, then you may as well say nothing. You get me?
EDIT: If fatboy had already posted the correct way to go about whatever they were trying to do, that's even more of a reason not to post.
-
08-13-2008, 01:53 PM #9234lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
Turtles post also gives a tip to fatboy's method.
Plus dan needs to know he should stop posting help when he doesnt know what hes doing.
Noobs helping noobs isn't good.
EDIT:
look at this example
[WIP] Arkanoid Deluxe
then
[WIP] Arkanoid Deluxe
He doesn't know what he is doing.
-
08-13-2008, 01:56 PM #9235QJ Gamer Platinum
- Registriert seit
- Feb 2006
- Ort
- National Front Disco
- Beiträge
- 13.057
- Points
- 66.627
- Level
- 100
- Downloads
- 0
- Uploads
- 0
-
08-13-2008, 02:12 PM #9236QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
Sorry, I forgot it was a web form not a normal text editor and hit tab-enter to go to a new line with the previous indented to write the little code example and it submitted. I edited it right after I posted it, probably while you were posting.
-
08-13-2008, 02:26 PM #9237Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
i was going to let luke work it out for him self but then dan posted some crap so i thought i would correct it. im sure luke wont find it too hard to elaborate on what i have shown him now.
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
08-13-2008, 03:11 PM #9238Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
You guys Need to Chill out, 1 post!! Seriously.
I knew it was most promblem wrong.
And those posts were kinda stupid. I admit that. Though How Many Times Do i Rotate text, ummmh 0.I didn't get it at first but know i kinda do.
Would that be right.Code:System.currentDirectory("mso:/") list = System.listDirectory() files = table.getn(list)
P.s just to get the list of mso:/? Not print!! Also just to explain (because people think i don't know what i'm doing!)
table.getn(list) --- gets the size of the array (list)
System.currentDirectory ("mso:/") --sets the current working directory
System.listDirectory() --list the current directory
-
08-13-2008, 03:41 PM #9239QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
"I knew it was most promblem wrong"
Then why did you post it trying to help someone who didn't know either?
Anyways
You don't have to set your current working directory to get the list of that folder, you can just do
theFiles = System.listDirectory("ms0 :/")
and then
numberOfFilesInTheRootMSF older = table.getn(theFiles)
if you have PSP, ISO, MUSIC, and VIDEO folders in the root of your ms, the table would look like this:
theFiles = {
{name="PSP",size=?,direct ory=true},
{name="ISO",size=?,direct ory=true},
{name="MUSIC",size=?,dire ctory=true},
{name="VIDEO",size=?,dire ctory=true}}
? because I don't remember what it fills in for the size of a folder, but I believe it is 0
-
08-13-2008, 04:25 PM #9240Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Ok thanks, would it just get folders?Or other files? e.g a txt file or .zip?
Well i posted because my first thought was what i typed, thinking about it a second time i knew that it wouldn't have worked.I should of EDITED it.


LinkBack URL
About LinkBacks
Mit Zitat antworten

Hello everyone I am new here and I am glad to be part of this amazing community and I think there...
New to forum