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!

new to lua

This is a discussion on new to lua within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; i wanted to make my own game and i dint know anything about lua or C / C++ so i ...

Reply
 
LinkBack Thread Tools
Old 06-27-2006, 04:00 AM   #1
 
mumford54's Avatar
 
Join Date: Mar 2006
Location: Uk South (not London )
Posts: 93
Trader Feedback: 0
Default new to lua

i wanted to make my own game and i dint know anything about lua or C / C++ so i followed this-

http://www.psp-programming.com/tutor...a/lesson02.htm

to learn a bit and when i was finished the TUTORIAL i put the folder with music, images and my script.lua in a folder in the normal place ( PSP\GAME\luaplayer\Applic ations) and when i went to run the script it said "no script found restart"

Please Can any one help?


Tis is my script after folowing the tutorial-

Code:
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) 

background = Image.load("images/background.jpg")

screen:print(194, 136, "Loading: 0%", pink)
screen.flip() 

screen:print(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()
screen:print(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()
screen:print(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()
screen:print(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()
screen:print(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.png")

screen:clear()
screen:print(194, 136, "Loading: 100%", pink)
screen.flip() 

screen:blit(0, 0, splash, false)
screen.waitVblankStart()
screen.flip()

boltsnd:play() 

screen.waitVblankStart(240)
Music.volume(128)

screen:blit(0, 0, background, false)

pad = Controls.read() 

screen:print(135, 251, "Press 'Start' to restart", blue)
          screen:print(110, 261, "Press 'Select' for a screenshot", blue)
          screen:print(383, 35, "Support:", black)
          screen:print(365, 45, "PS3Lounge.net", orange)
          screen:print(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
mumford54 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-27-2006, 04:09 AM   #2

Mindless Self Indulgence
 
Realn0whereman's Avatar
 
Join Date: Oct 2005
Location: afk
Posts: 7,212
Trader Feedback: 0
Default

i think you have a few too many screen.flips ... but i am rusty with lua
__________________
PSN:realn0whereman
NEW MSI ALBUM APRIL 29TH: IF
*orgasm*
Realn0whereman is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-27-2006, 04:30 AM   #3
 
mumford54's Avatar
 
Join Date: Mar 2006
Location: Uk South (not London )
Posts: 93
Trader Feedback: 0
Default

Quote:
Originally Posted by realn0whereman
i think you have a few too many screen.flips ... but i am rusty with lua
how would that make lua player think there is no script
mumford54 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-27-2006, 04:37 AM   #4

Mindless Self Indulgence
 
Realn0whereman's Avatar
 
Join Date: Oct 2005
Location: afk
Posts: 7,212
Trader Feedback: 0
Default

i dunno... heres a useful tool if your into lua: windows lua player. lua player for windows.
__________________
PSN:realn0whereman
NEW MSI ALBUM APRIL 29TH: IF
*orgasm*
Realn0whereman is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-27-2006, 06:59 AM   #5
Think, Do, Gloat.
 
TPTaylor's Avatar
 
Join Date: Nov 2005
Location: England, Norwich
Posts: 1,422
Trader Feedback: 0
Default

You said you put images in the same folder. Did you mean you put it in a folder named images, or just the same as the script? It needs to be in a folder called images.
TPTaylor is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-27-2006, 07:12 AM   #6

<img src="images/smilies/psp.gif" border="0" alt="" title="" cl***="inlineimg" /> <img src="images/smilies/Punk.gif" border="0" alt="" title="" cl***=&
 

 
Join Date: Jun 2005
Location: Canada
Posts: 1,944
Trader Feedback: 0
Default

you also have no while true do, so it will onlyrun once

and take out all your screenflips an put this at the bottom(before end)

screen.waitVblankStart()
screen.flip()
Electro is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-27-2006, 08:13 AM   #7

total-Z
 
youresam's Avatar
 
Join Date: Jul 2005
Location: texas
Posts: 2,803
Trader Feedback: 0
Default

LuaPlayer is programmed to ALWAYS say "no script file found". There should be an error above it, what does it say?

If you are only getting "no script file found", then you set up luaplayer wrong. Make a new folder in /Applications/ with your program name, then put index.lua inside it.
__________________
牧来栠摩琠敨映汩獥
PSN: youresam
From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth
youresam is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-27-2006, 08:37 AM   #8

Mindless Self Indulgence
 
Realn0whereman's Avatar
 
Join Date: Oct 2005
Location: afk
Posts: 7,212
Trader Feedback: 0
Default

penut butter cup... meheheheheheh
__________________
PSN:realn0whereman
NEW MSI ALBUM APRIL 29TH: IF
*orgasm*
Realn0whereman is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-28-2006, 07:21 AM   #9
 
mumford54's Avatar
 
Join Date: Mar 2006
Location: Uk South (not London )
Posts: 93
Trader Feedback: 0
Default

Quote:
Originally Posted by TPTaylor
You said you put images in the same folder. Did you mean you put it in a folder named images, or just the same as the script? It needs to be in a folder called images.
i have a folder that is called "my game" then in there i have an images folder and a sound folder and my script


and to
Quote:
LuaPlayer is programmed to ALWAYS say "no script file found". There should be an error above it, what does it say?

If you are only getting "no script file found", then you set up luaplayer wrong. Make a new folder in /Applications/ with your program name, then put index.lua inside it.
it just says on the top line---- Error: no script file found

2nd line ---press start to restart
mumford54 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 09:08 AM.



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