QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

Lua help

This is a discussion on Lua help within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; how do u load a lot of numbered images quikly i thought it was this Code: for a = 1,1000 ...

Reply
 
LinkBack Thread Tools
Old 04-27-2006, 06:40 PM   #1
 
ttotto's Avatar
 
Join Date: Apr 2006
Location: Upland, California
Posts: 89
Trader Feedback: 0
Default Lua help

how do u load a lot of numbered images quikly

i thought it was this
Code:
 
for a = 1,1000 do
local a
image[a]=Image.load("image"..a".jpeg")
end


please reply for help!!
__________________
PSP 1.5
Psp homebrew projects:
psp RTS

MY WEBPAGE
ttotto is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-27-2006, 06:59 PM   #2
 
PopcOrn DeVil's Avatar
 
Join Date: Jan 2006
Location: Western Australia
Posts: 1,044
Trader Feedback: 0
Default

Please use the lua help thread next time.
PopcOrn DeVil is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-27-2006, 07:01 PM   #3
TheMarioKarters
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by PopcOrn DeVil
Please use the lua help thread next time.
Rules are for lamers!
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-27-2006, 07:04 PM   #4
 
ttotto's Avatar
 
Join Date: Apr 2006
Location: Upland, California
Posts: 89
Trader Feedback: 0
Default

I did and no one is responding so sorrry!!!! jeezz
__________________
PSP 1.5
Psp homebrew projects:
psp RTS

MY WEBPAGE
ttotto is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-27-2006, 07:05 PM   #5
 
PopcOrn DeVil's Avatar
 
Join Date: Jan 2006
Location: Western Australia
Posts: 1,044
Trader Feedback: 0
Default

Quote:
Originally Posted by TheMarioKarters
Rules are for lamers!
Hahaha... shut up.
PopcOrn DeVil is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-28-2006, 09:36 AM   #6
 
EminentJonFrost's Avatar
 
Join Date: Dec 2005
Location: Here
Posts: 2,715
Trader Feedback: 0
Default

Quote:
Originally Posted by ttotto
how do u load a lot of numbered images quikly

i thought it was this
Code:
 
for a = 1,1000 do
local a
image[a]=Image.load("image"..a".jpeg")
end


please reply for help!!
dont you have to do something like...:
Code:
image = {}
...first?
I'm learning tables right now...sorry if its wrong. But I'm sure you have to define "image" as a table before using it as one.
__________________
[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
EminentJonFrost is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-28-2006, 10:24 AM   #7
 
Join Date: Oct 2005
Location: Phoenix
Posts: 208
Trader Feedback: 0
Default

Quote:
Originally Posted by ttotto
how do u load a lot of numbered images quikly

i thought it was this
Code:
 
for a = 1,1000 do
local a
image[a]=Image.load("image"..a".jpeg")
end


please reply for help!!
Should be:
Code:
 
image = {}
for a = 1,1000 do
image[a]=Image.load("image" .. a .. ".png")
end
I'm not sure that Lua supports jpegs. Besides, PNG is a better format :P.

And for pete's sake people, is it really that hard to just freakin help someone instead of posting useless crap? It really makes me sick.
__________________
[url=http://profile.mygamercard.net/b0xx0r][img]http://card.mygamercard.net/gelsig/b0xx0r.png[/img][/url]
b0xx0r is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-28-2006, 10:27 AM   #8
Think, Do, Gloat.
 
TPTaylor's Avatar
 
Join Date: Nov 2005
Location: England, Norwich
Posts: 1,422
Trader Feedback: 0
Default

And it would have eventually been answered in the help thread, it just takes a small bit longer.
TPTaylor is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-28-2006, 01:08 PM   #9
 
EminentJonFrost's Avatar
 
Join Date: Dec 2005
Location: Here
Posts: 2,715
Trader Feedback: 0
Default

Quote:
Originally Posted by TPTaylor
And it would have eventually been answered in the help thread, it just takes a small bit longer.
Code:
fatal error in script: "...small bit..." - false or nil value attempt to make true failed
lol

It would have been answered, but you would have to spam that thread to get answered anytime soon..

back on topic - BTW, did it work yet?
__________________
[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
EminentJonFrost is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-28-2006, 01:09 PM   #10
 
Soulphalanx's Avatar
 
Join Date: Sep 2005
Location: TROY
Posts: 2,989
Trader Feedback: 0
Default

you forgot to add 1 to variable a when you go through the loop
__________________
[IMG]http://img121.imageshack.us/img121/3852/untitled1copy7rf.png[/IMG] [IMG]http://img99.imageshack.us/img99/9711/newavatarjb9.gif[/IMG]


[URL=http://forums.qj.net/showthread.php?t=9733][COLOR=DarkRed]Operation Positive Posting[/COLOR][/URL] [URL=http://forums.qj.net/showthread.php?t=49762][COLOR=Red]Guide to All Guides[/COLOR][/URL]
[URL=http://forums.qj.net/showthread.php?t=13798][COLOR=Blue]Posting Guidelines[/COLOR][/URL] [URL=http://forums.qj.net/showthread.php?t=4394][COLOR=Green]Piracy Policy[/COLOR][/URL]

[SIZE="3"][URL=http://forums.qj.net/f-general-psp-help-22/t-guide-opening-psp-disassembly-assembly-video-104303.html][COLOR=Red][B][U]PSP Disassembly Assembly Video Tutorial[/U][/B][/COLOR][/URL][/SIZE]
Soulphalanx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-28-2006, 02:35 PM   #11
 
Join Date: Oct 2005
Location: Phoenix
Posts: 208
Trader Feedback: 0
Default

Quote:
Originally Posted by Soulphalanx
you forgot to add 1 to variable a when you go through the loop
In a for loop, it's done automatically .
__________________
[url=http://profile.mygamercard.net/b0xx0r][img]http://card.mygamercard.net/gelsig/b0xx0r.png[/img][/url]
b0xx0r is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-28-2006, 07:54 PM   #12
 
ttotto's Avatar
 
Join Date: Apr 2006
Location: Upland, California
Posts: 89
Trader Feedback: 0
Default

i no i have to add one but it wasnt working for me
__________________
PSP 1.5
Psp homebrew projects:
psp RTS

MY WEBPAGE
ttotto is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-28-2006, 08:04 PM   #13
 
ttotto's Avatar
 
Join Date: Apr 2006
Location: Upland, California
Posts: 89
Trader Feedback: 0
Default

heres the code i have
Code:
image = {}
for a = 1,1362 do
local a
image[a]=Image.load("image" ..a.. ".jpeg")
end
this is the message i get:

attempt to concatenate local 'a' (a nil value)
__________________
PSP 1.5
Psp homebrew projects:
psp RTS

MY WEBPAGE
ttotto is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-28-2006, 08:45 PM   #14
 
PSPMillionaire's Avatar
 
Join Date: Oct 2005
Location: Alabama
Posts: 272
Trader Feedback: 0
Default

remove that local part. if that doesnt work try converting a to a string like below
Code:
image = {}
for a = 1,1362 do
image[a]=Image.load("image" ..tostring(a).. ".jpeg")
end
__________________
My lua tutorials for PSP - [url=http://www.evilmana.com/tutorials]www.evilmana.com/tutorials[/url]
[B]PSP Lua CodeBase[/B] - Add your own code examples to the codebase! - [url=http://evilmana.com/tutorials/codebase/]www.evilmana.com/tutorials/codebase/[/url]
PSPMillionaire is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-28-2006, 10:41 PM   #15
 
ttotto's Avatar
 
Join Date: Apr 2006
Location: Upland, California
Posts: 89
Trader Feedback: 0
Default

i tied pspmillionairs ideas and both get
error loading image error
__________________
PSP 1.5
Psp homebrew projects:
psp RTS

MY WEBPAGE
ttotto is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-29-2006, 01:20 AM   #16
 
Join Date: Oct 2005
Location: Phoenix
Posts: 208
Trader Feedback: 0
Default

You get an image loading error because, as I said earlier, you cannot load JPEGs, only PNGs.
__________________
[url=http://profile.mygamercard.net/b0xx0r][img]http://card.mygamercard.net/gelsig/b0xx0r.png[/img][/url]
b0xx0r is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-29-2006, 04:44 AM   #17
 
EminentJonFrost's Avatar
 
Join Date: Dec 2005
Location: Here
Posts: 2,715
Trader Feedback: 0
Default

Quote:
Originally Posted by b0xx0r
You get an image loading error because, as I said earlier, you cannot load JPEGs, only PNGs.
you can load jpegs

go over to pspdevwiki and see.
try changing the photo extension from jpeg to jpg
__________________
[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
EminentJonFrost is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-29-2006, 03:25 PM   #18
 
PSPMillionaire's Avatar
 
Join Date: Oct 2005
Location: Alabama
Posts: 272
Trader Feedback: 0
Default

I think the error is due to the amount of images being loaded.
That's really an unreasonable amount of images to load for luaplayer.
__________________
My lua tutorials for PSP - [url=http://www.evilmana.com/tutorials]www.evilmana.com/tutorials[/url]
[B]PSP Lua CodeBase[/B] - Add your own code examples to the codebase! - [url=http://evilmana.com/tutorials/codebase/]www.evilmana.com/tutorials/codebase/[/url]
PSPMillionaire is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-30-2006, 07:21 PM   #19
 
ttotto's Avatar
 
Join Date: Apr 2006
Location: Upland, California
Posts: 89
Trader Feedback: 0
Default

your probly right ill try to reduce the number of images
thx for the help
__________________
PSP 1.5
Psp homebrew projects:
psp RTS

MY WEBPAGE
ttotto is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
lua

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 02:01 AM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us