PSP3D Left Header
PSP3D Header Right
PSP3D Logo CraveOnline Logo
Help the PSP 3D community grow!
Vote for us below:


Vote on the PSP Top 200
PSP Top 200 - Games, Videos, Wallpapers, Files, Hacks, Homebrew

Development Center - Learn the basics of coding or talk about advanced coding techniques with other developers.

Welcome to PSP3D.com - Sony PlayStation Portable News, Homebrew, Hacks, Reviews, Videos, Mods, Forums!

You are currently viewing our website as a guest, which gives you limited access to reply and interact to discussions and other members. By joining our free community, you will be able to post topics in the forums, communicate privately with other members, vote in polls, and access many other special features.

Registration is fast, simple, and absolutely free so join our community today!

Go Back PSP3D.com - Sony PlayStation Portable News, Homebrew, Hacks, Reviews, Videos, Mods, Forums > PSP Forums > Development Center

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-29-2006, 07:14 AM
Southparkmaniac's Avatar
Southparkmaniac Southparkmaniac is offline
Crash Bandicoot addict!
 
Join Date: Dec 2005
Location: Adelaide-Australia
Posts: 618
Points: 5.98
Donate
Send a message via AIM to Southparkmaniac Send a message via ShopTapNham to Southparkmaniac
Lua lesson 2 help!

Im new to coding, and im following this guide http://www.scriptscribbler.com/psp/lua/lesson02.htm
I just want to know if the download pack that contains all the images and souns has everything you need? Coz I downloaded it and followed the instructions and it doesn't work. Thanks if anyone helps
__________________

Reply With Quote
  #2 (permalink)  
Old 03-29-2006, 07:55 AM
chrispy chrispy is offline
Senior Member
My Mood:
 
Join Date: Jan 2006
Posts: 351
Points: 41.54
Donate
Right, can you copy you script here or upload it please?
Reply With Quote
  #3 (permalink)  
Old 03-29-2006, 08:03 AM
Southparkmaniac's Avatar
Southparkmaniac Southparkmaniac is offline
Crash Bandicoot addict!
 
Join Date: Dec 2005
Location: Adelaide-Australia
Posts: 618
Points: 5.98
Donate
Send a message via AIM to Southparkmaniac Send a message via ShopTapNham to Southparkmaniac
System.usbDiskModeActivate()
pink = Color.new(255, 0 , 153)
blue = Color.new(0 , 153, 255)
orange = Color.new(255, 102, 0)
gray = Color.new(153, 153, 153)
black = Color.new(0 , 0 , 0)
screenrint(194, 136, "Loading: 0%", pink)
screen.flip()
background = Image.load("images/background.jpg")
screen:clear()
screenrint(194, 136, "Loading: 20%", pink)
screen.flip()
circle = Image.load("images/buttons/circle_button.png")
down = Image.load("images/buttons/down_arrow.png")

screen:clear()
screenrint(194, 136, "Loading: 40%", pink)
screen.flip()

l = Image.load("images/buttons/left_trigger.png")
left = Image.load("images/buttons/left_arrow.png")

screen:clear()
screenrint(194, 136, "Loading: 60%", pink)
screen.flip()

r = Image.load("images/buttons/right_trigger.png")
right = Image.load("images/buttons/right_arrow.png")
boltsnd = Sound.load("music/comp.wav")

screen:clear()
screenrint(194, 136, "Loading: 80%", pink)
screen.flip()

square = Image.load("images/buttons/square_button.png")
triangle = Image.load("images/buttons/triangle_button.png")

screen:clear()
screenrint(194, 136, "Loading: 90%", pink)
screen.flip()

up = Image.load("images/buttons/up_arrow.png")
x = Image.load("images/buttons/cross_button.png")
splash = Image.load("images/lua.gif")

screen:clear()
screenrint(194, 136, "Loading: 100%", pink)
screen.flip()
screen.waitVblankStart(60)
screen:blit(0, 0, splash, false)
screen.waitVblankStart()
screen.flip()
boltsndlay()
screen.waitVblankStart(240)
Music.volume(128)
screen:blit(0, 0, background, false)
pad = Controls.read()
screenrint(135, 251, "Press 'Start' to restart", blue)
screenrint(110, 261, "Press 'Select' for a screenshot", blue)
screenrint(383, 35, "Support:", black)
screenrint(365, 45, "PS3Lounge.net", orange)
screenrint(365, 55, "scriptscribbler.com/psp", gray)
screen.flip()
if pad:cross() then
screen:blit(50, 228, x)
screen.flip()
end
if pad:circle() then
screen:blit(90, 195, circle)
screen.flip()
end

if pad:triangle() then
screen:blit(45, 165, triangle)
screen.flip()
end

if pad:square() then
screen:blit(15, 195, square)
screen.flip()
end

if pad:up() then
screen:blit(60, 40, up)
screen.flip()
end

if pad:right() then
screen:blit(90, 65, right)
screen.flip()
end

if pad:down() then
screen:blit(60, 80, down)
screen.flip()
end

if pad:left() then
screen:blit(30, 65, left)
screen.flip()
end

if pad:l() then
screen:blit(4, 6, l)
screen.flip()
end

if pad:r() then
screen:blit(403, 4, r)
screen.flip()
end
if pad:select() then screen:save("screenshot.tga") end
if pad:start() then
break
end
end



__________________

Reply With Quote
  #4 (permalink)  
Old 03-29-2006, 08:30 AM
PopcOrn DeVil's Avatar
PopcOrn DeVil PopcOrn DeVil is offline
Highly Respected Member
My Mood:
 
Join Date: Jan 2006
Location: Western Australia
Age: 15
Posts: 911
Points: 1.23
Donate
Send a message via AIM to PopcOrn DeVil Send a message via ShopTapNham to PopcOrn DeVil
Yes it has everything you need.
Reply With Quote
  #5 (permalink)  
Old 03-29-2006, 09:17 AM
chrispy chrispy is offline
Senior Member
My Mood:
 
Join Date: Jan 2006
Posts: 351
Points: 41.54
Donate
What FW are you on? If its 2.xx+, you need to lose the System.usbDiskModeActivate()
line. It makes my scripts not work.

I looked at the tutorial and tried it myself, and using some debugging, I found that it crashes when it gets to
splash = Image.load("images/lua.gif")

So I made a jpg of the file and corrected the code.

In future, if you cant tell where your program crashes, try writing the following after each line of code in the area you think is a problem

screen:clear()
screenrint(194, 136, "CHECK [x]", white)
screen.flip()

NB Must define WHITE if this is used

use a different vlaue for [x] each time you use this idea, and then you should get to a certain CHECK. Say you never reach CHECK 6. The line of code that comes before

screen:clear()
screenrint(194, 136, "CHECK 6", white)
screen.flip()

Is your problem line!

ran your script, and got a 'no script' error, is that what you got??

Last edited by chrispy : 03-29-2006 at 09:37 AM.
Reply With Quote
  #6 (permalink)  
Old 03-30-2006, 01:53 AM
Southparkmaniac's Avatar
Southparkmaniac Southparkmaniac is offline
Crash Bandicoot addict!
 
Join Date: Dec 2005
Location: Adelaide-Australia
Posts: 618
Points: 5.98
Donate
Send a message via AIM to Southparkmaniac Send a message via ShopTapNham to Southparkmaniac
Im on 1.5 firmware. And yes I did get a no script error, thanks for your help so far.
__________________

Reply With Quote
  #7 (permalink)  
Old 03-30-2006, 11:41 AM
chrispy chrispy is offline
Senior Member
My Mood:
 
Join Date: Jan 2006
Posts: 351
Points: 41.54
Donate
OK then.
I was gonna attach the script, fixed, but my psp is upstairs charging, So I cant (be bothered)

What I did was loaded it into ttlde 1.7, a Lua App for PSP which is a lua IDE. Its real easy to use, and you can compile it from within the program. If theres an error, it helps you out, rather than just saying 'error'

I suggest you find a copy of ttlde, and debug in that. I dont advise TTLDE for writing lua, just debugging for PSP.
Reply With Quote
  #8 (permalink)  
Old 03-30-2006, 05:17 PM
Southparkmaniac's Avatar
Southparkmaniac Southparkmaniac is offline
Crash Bandicoot addict!
 
Join Date: Dec 2005
Location: Adelaide-Australia
Posts: 618
Points: 5.98
Donate
Send a message via AIM to Southparkmaniac Send a message via ShopTapNham to Southparkmaniac
ok thanks verymuch, could you please upload the debugged file when your ready? Thanks
__________________


Last edited by jaker : 03-31-2006 at 03:13 AM.
Reply With Quote
  #9 (permalink)  
Old 04-03-2006, 03:01 AM
Southparkmaniac's Avatar
Southparkmaniac Southparkmaniac is offline
Crash Bandicoot addict!
 
Join Date: Dec 2005
Location: Adelaide-Australia
Posts: 618
Points: 5.98
Donate
Send a message via AIM to Southparkmaniac Send a message via ShopTapNham to Southparkmaniac
I still need help but with this

http://www.sendspace.com/file/rehx9o
__________________

Reply With Quote
Reply

« Overflow Possibility Or Glitch? | my first homebrew!! »



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Points Per Thread View: 0.00
Points Per Thread: 1.00
Points Per Reply: 0.10

Similar Threads
Thread Thread Starter Forum Replies Last Post
PSP Programming Tutorials: Lesson 05 Released! Robert A. Homepage News 4 01-21-2006 10:27 PM





Crave Partner Sites: CraveOnline.com | DVDFile.com | PSP3D.com | ComingSoon.net | SuperHeroHype.com | RedBalcony.com | ActionTrip.com | CraveLyrics.com
Soundtrack.net | CraveFix.com | SpikedHumor.com | RPGamer.com | TattooNow.com | ImpactWrestling.com | SeekLyrics.com | PedalBMX.com | WildKO.com
vidKing.com | StrategyInformer.com | HHdb.com | RapLeagues.com | HipHop-Lyrics.com | Cravecocktails.com | ThePhatPhree.com | RideJudge.com | HottieSpots.com

ShopTapNham Shop Online Powered by Custom vB Version 5.1.0 for Crave Online Media, LLC.
Copyright © 2000 - 2007, Jelsoft Enterprises Ltd. and PSP3D.com.
LinkBacks Enabled by vBSEO 3.0.0 RC8

All times are GMT -4. The time now is 10:30 AM.
ShopTapNham Footer Right