PSP Hacks - Forums

Go Back   PSP Hacks - Forums > Tech Talk > LUA Scripting

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 09-04-2009, 05:45 PM
kakashi2407's Avatar
kakashi2407 kakashi2407 is offline
PSP Neophyte
 

Join Date: May 2009
Posts: 87
kakashi2407 Has a Beginner Reputation
Default Help Newbie Lua User....

I've been practicing and I'm stuck becuz the damn program won't run...I'm a newbie at this and I want to know if I did something obviously wrong....

Quote:
-- ******* Variables ********
--My First LUA Program
--Author: Kakashi2407

green = Color.new(0,255,0)

upPressed = 'You are pressing the "UP" button'
downPressed = 'You are pressing the "DOWN" button'
leftPressed = 'You are pressing the "LEFT" button'
rightPressed = 'You are pressing the "RIGHT" button'
LPressed = 'You are pressing the "L" button'

-- *****Main Loop******

screen:clear()

pad = Controls.read()

--****Directional Buttons****

if pad:up() then
screen:print(100,100,upPressed,green)
end
if pad:down() then
screen:print(100,100,downPressed,green)
end
if pad:left() then
screen:print(100,100,leftPressed,green)
end
if pad:right() then
screen:print(100,100,rightPressed,green)
end
if pad:l() then
screen:print(100,100,LPressed,green)
end
--*****Button****
if pad:r() then
screen:print(100,100,'You are pressing the "R" button',green)
end
if pad:triangle() then
screen:print(100,100,'You are pressing the "TRIANGLE" button',green)
end
if pad:circle() then
screen:print(100,100,'You are pressing the "CIRCLE" button',green)
en
if pad:cross() then
screen:print(100,100,'You are pressing the "X" button',green)
end
if pad:square() then
screen:print(100,100,'You are pressing the "SQUARE" button',green)
end

--End Loop
screen.waitVblankStart()
screen.flip()
end
__________________
2.71 > 2.80 > 1.50 > M33 Creator > 3.52 M33 > 3.90 M33 > 5.00 M33-6 > 5.50 GEN-A > 5.50 GEN-B:P ~8GB Memory Stick~


Last edited by kakashi2407; 09-04-2009 at 05:51 PM.
Reply With Quote
  #2  
Old 11-06-2009, 07:55 PM
PenHacks PenHacks is offline
PSP Newbie
 

Join Date: Jul 2009
Posts: 9
PenHacks Has a Beginner Reputation
Default

I'm kinda a newbie at this too, so this may not work but try adding screen:flip() after pad = Controls.read()
__________________


^ My site... we have some jobs open
Reply With Quote
  #3  
Old 11-12-2009, 07:37 PM
CarthageForever's Avatar
CarthageForever CarthageForever is offline
PSP Neophyte
 

Join Date: Apr 2008
Location: New York
Posts: 88
CarthageForever Has a Beginner Reputation
Default

Put your main loop above your variables. And could you give the exact error. What is your problem?
__________________
PSP Specs:
Slim And Lite TA-085 MoBo
Firmware: 5.50 GEN D2
Mods: UMD Jewel, LED Triggers and Clear Case.
Reply With Quote
Reply

Tags
help with lua, lua

 



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:21 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©