Skip to: Site menu | Main content


Welcome to PSP-Programming.com, a place for developers to get together.

Welcome to the forums. Here you can find other user tutorials as well as homebrew releases and the source code repository. You can also ask for help with your code here and post your own homebrew!

PSP-Programming.com Forums
February 11, 2012, 01:20:58 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

News: Check out the Code Section!
Home Help Search Shop Login Register
Digg This!
Pages: [1]
Print
Author Topic: LUA Tutorial help  (Read 2160 times)
baseball3
Newbie
*

Karma: +1/-0
Offline Offline

Posts: 7
286.00 points

View Inventory
Send Money to baseball3


View Profile
« on: December 17, 2009, 05:36:36 AM »

Hi everyone i was just following the lua tutorial lesson number two and i finished my code.Then i put it on my psp...I started it up and it loaded like it was supposed to do.But then it got to the "Powered by lua player" part and i saw the background for a split-second and then it said Error: SCRIPT.Lua:73: loop in gettable
press start to restart.Thanks in advance.
Logged

Semper fi


stinkee2
I thought the most important rule was "Why do today what you can put off 'till tomorrow"
Jr. Member
**

Karma: +5/-0
Offline Offline

Posts: 62
663.93 points

View Inventory
Send Money to stinkee2
Im so thirsty I could eat a house - Stinkee2


View Profile
« Reply #1 on: December 17, 2009, 12:55:27 PM »

I dont Program in LUA but your error has something to do with line 73 of SCRIPT.Lua

If you need help finding it you could post the source and maybe other people can help find it.

Wink
Logged

Dumping... 0.000001%, Speed: 1 byte/h.
An Abort of this application will corrupt your BIOS,Void your warranty, and Render your computer useless.
Please wait...
baseball3
Newbie
*

Karma: +1/-0
Offline Offline

Posts: 7
286.00 points

View Inventory
Send Money to baseball3


View Profile
« Reply #2 on: December 17, 2009, 01:29:31 PM »

Ok here it is.

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)
screen:print(194, 136, "Loading: 0%", pink)
screen.flip()
background = Image.load("images/background.jpg")
screen:clear()
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.waitVblankStart(60)
screen:blit(0, 0, splash, false)
screen.waitVblankStart()
screen.flip()
boltsnd:play()
screen.waitVblankStart(240)
Music.volume(128)
while true do
       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:trangle() 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:right() 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
Logged

Semper fi
AlphaDingDong
Combat Muskrat
All-Around Dev
Hero Member
*

Karma: +32/-3
Offline Offline

Posts: 882
2044.69 points

View Inventory
Send Money to AlphaDingDong
Hey... Are you gonna eat that?


View Profile
« Reply #3 on: December 18, 2009, 07:35:37 PM »

'loop in gettable' means that it wasn't able to find a method that you called.

If you stare at line 73 for a minute it'll jump out at you.

if pad:trangle() then

Logged
baseball3
Newbie
*

Karma: +1/-0
Offline Offline

Posts: 7
286.00 points

View Inventory
Send Money to baseball3


View Profile
« Reply #4 on: December 19, 2009, 12:48:08 PM »

Thanks!!It worked Very Happy
Logged

Semper fi
Pages: [1]
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.524 seconds with 29 queries.
Sister Sites: Guitar Hero 4   BrokeniTouch.com