Results 1 to 5 of 5

Thread: Help Newbie Lua User....

  
  1. #1
    kakashi2407's Avatar
    kakashi2407 is offline -Hacks Neophyte
    Join Date
    May 2009
    Posts
    87
    Rep Power
    10

    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....

    -- ******* 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

    Last edited by kakashi2407; 09-04-2009 at 04:51 PM.
    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 ~8GB Memory Stick~


  2. #2
    PenHacks's Avatar
    PenHacks is offline -Hacks Smarty
    Join Date
    Jul 2009
    Posts
    111
    Rep Power
    9

    Default

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

    PenHacks.net <-- Community Forums. Join the discussion, unleash your console.
    PsVitals - The Vital PS Vita site on the internet

  3. #3
    CarthageForever's Avatar
    CarthageForever is offline -Hacks Smarty
    Join Date
    Apr 2008
    Location
    New York
    Posts
    102
    Rep Power
    11

    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-088v3 MoBo
    Firmware: 5.03 OFW (Using ChickHenR2 + CFWEnabler)
    Mods: UMD Jewel, LED Triggers and Clear Case.

  4. #4
    AssassinXCV is offline -Hacks Newbie
    Join Date
    Oct 2008
    Posts
    2
    Rep Power
    0

    Default

    Quote Originally Posted by PenHacks View Post
    I'm kinda a newbie at this too, so this may not work but try adding screen:flip() after pad = Controls.read()
    are you retarded?? no offense but what good would adding screen:flip() do??

  5. #5
    gold2040's Avatar
    gold2040 is offline Senior Member -Hacks Veteran
    Join Date
    Jul 2006
    Location
    .:: UK ::.
    Posts
    1,493
    Rep Power
    14

    Default

    Quote Originally Posted by AssassinXCV View Post
    are you retarded?? no offense but what good would adding screen:flip() do??
    you know the answer then?, no need to bash other users now
    PSPDosbox ---> Compatibility List
    Want to contribute, PM me


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •