Seite 54 von 342 ErsteErste ... 4 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 104 154 ... LetzteLetzte
Zeige Ergebnis 1.591 bis 1.620 von 10238

Lua Programming Help Thread

This is a discussion on Lua Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; try this: Code: ----joke white= Color.new(225,225,225) brick=Image.load("Smile.png") ------ end load while true do screen:print(10, 10, "Opening Flash0", white) screen.waitVblankStart(12 0) ...

  
  1. #1591
    Developer
    Points: 12.360, Level: 72
    Level completed: 78%, Points required for next Level: 90
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Isle of Wight
    Beiträge
    491
    Points
    12.360
    Level
    72
    Downloads
    0
    Uploads
    0

    Standard

    try this:

    Code:
    ----joke
    white= Color.new(225,225,225)
    brick=Image.load("Smile.png")
    ------ end load
    
    while true do
    
    screen:print(10, 10, "Opening Flash0", white)
    screen.waitVblankStart(12  0)
    
    screen:print(10, 20, "Cant Open... Starting Brute Force", white)
    screen.waitVblankStart(120)
    
    screen:print(10, 25, "jfklafdjoaiudfjkfdajklfda   fdjlkadfkl", white)
    screen.waitVblankStart(10)
    
    screen:print(10, 35, "9803418093147893124891327   48913298478913", white)
    screen.waitVblankStart(10)
    
    screen:print(10, 40, "3249020234230432040234902   34023943204932", white)
    screen.waitVblankStart(5)  
    
    screen:print(10, 50, "Flash0 Open.. Shuting Down will cuas a brick.", white)
    screen.waitVblankStart(20)
    
    screen:print(10, 60, "Flash0:/vsh is being delited", white)
    screen.waitVblankStart(60)
    
    screen:print(10, 70, "There you Go Bricked PSP", white)
    screen.waitVblankStart(5)  
    
    screen:print(10, 80, "Enjoy By-By now", white)
    screen.waitVblankStart(30 )
    
    screen.flip()
    
    end




    PM me for a sig like this!

    http://dspspforums.com/forums/index.php SIGN UP NOW!

  2. #1592
    Jesus loves me more.
    Points: 11.452, Level: 70
    Level completed: 51%, Points required for next Level: 198
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Illegal Abric Sites
    Beiträge
    1.551
    Points
    11.452
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    nope still shows no text


  3. #1593
    Developer
    Points: 12.360, Level: 72
    Level completed: 78%, Points required for next Level: 90
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Isle of Wight
    Beiträge
    491
    Points
    12.360
    Level
    72
    Downloads
    0
    Uploads
    0

    Standard

    Ok try this:

    Code:
    ----joke
    white= Color.new(225,225,225)
    brick=Image.load("Smile.png")
    ------ end load
    
    function print()
    
    screen:print(10, 10, "Opening Flash0", white)
    screen.waitVblankStart(12    0)
    
    screen:print(10, 20, "Cant Open... Starting Brute Force", white)
    screen.waitVblankStart(12  0)
    
    screen:print(10, 25, "jfklafdjoaiudfjkfdajklfda     fdjlkadfkl", white)
    screen.waitVblankStart(10  )
    
    screen:print(10, 35, "9803418093147893124891327     48913298478913", white)
    screen.waitVblankStart(10  )
    
    screen:print(10, 40, "3249020234230432040234902     34023943204932", white)
    screen.waitVblankStart(5)    
    
    screen:print(10, 50, "Flash0 Open.. Shuting Down will cuas a brick.", white)
    screen.waitVblankStart(20  )
    
    screen:print(10, 60, "Flash0:/vsh is being delited", white)
    screen.waitVblankStart(60  )
    
    screen:print(10, 70, "There you Go Bricked PSP", white)
    screen.waitVblankStart(5)    
    
    screen:print(10, 80, "Enjoy By-By now", white)
    screen.waitVblankStart(30   )
    
    
    while true do
    
    print()
    
    screen.flip()
    
    end


    PM me for a sig like this!

    http://dspspforums.com/forums/index.php SIGN UP NOW!

  4. #1594
    QJ Gamer Green
    Points: 5.559, Level: 48
    Level completed: 5%, Points required for next Level: 191
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    506
    Points
    5.559
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    there should be screen.flips after each different piece of text otherwise it only shows all the text but only after all the screen.waitVblanckStart() 's are done, so after about 8 seconds. The one of Masta shaker should work (i took a quick look though).
    LUA manual:
    [url]http://www.lua.org/manual/5.0/manual.html[/url]

    LUA Wiki:
    [url]http://wiki.ps2dev.org/psp:lua_player[/url]

  5. #1595
    Developer
    Points: 12.360, Level: 72
    Level completed: 78%, Points required for next Level: 90
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Isle of Wight
    Beiträge
    491
    Points
    12.360
    Level
    72
    Downloads
    0
    Uploads
    0

    Standard

    You could justput screen:clear() before any of the text.


    PM me for a sig like this!

    http://dspspforums.com/forums/index.php SIGN UP NOW!

  6. #1596
    Points: 4.107, Level: 40
    Level completed: 79%, Points required for next Level: 43
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Beiträge
    17
    Points
    4.107
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Background info:
    Using LUA Player v.16, 2.6 Firmware, GTA Exploit - eLoader 0.9.7 - Bock (alternate "no cache" version)

    Question:
    Every time I add "System.usbDiskModeActiva te()" to my LUA scripts, they cause Lowser to freeze when I load those scripts within Lowser. Even when I try to toggle USB mode in Lowser, it causes Lowser to freeze. Does this mean that I have to enter USB mode in XMB (original PSP menu) to edit the lua script file and then reload GTA (and then the eloader) every time I want to edit my lua scripts? Is there an easier way?
    Geändert von dragaron (04-15-2006 um 11:06 AM Uhr)

  7. #1597
    Your Fate is Grim...
    Points: 11.640, Level: 70
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    2.269
    Points
    11.640
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von dragaron
    Background info:
    Using LUA Player v.16, 2.6 Firmware, GTA Exploit - eLoader 0.9.7 - Bock (alternate "no cache" version)

    Question:
    Every time I add "System.usbDiskModeActiva te ()" to my LUA scripts, they cause Lowser to freeze when I load those scripts within Lowser. Even when I try to toggle USB mode in Lowser, it causes Lowser to freeze. Does this mean that I have to enter USB mode in XMB (original PSP menu) to edit the lua script file and then reload GTA (and then the eloader) every time I want to edit my lua scripts? Is there an easier way?
    yes, becuase 2.1+ does not allow kernal, which is needed for USB mode. just use luaplayer for windows which can be found at luaplayer.org
    --------------------------------------------------------------------------------------

  8. #1598
    Points: 4.107, Level: 40
    Level completed: 79%, Points required for next Level: 43
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Beiträge
    17
    Points
    4.107
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Grimfate126
    yes, becuase 2.1+ does not allow kernal, which is needed for USB mode. just use luaplayer for windows which can be found at luaplayer.org
    Thanks for the reply. The problem I have with luaplayer for windows is that there is no way (that I know of) to recognize analog input.

    - keyboard mapping:
    SELECT = a
    START = s
    LTRIGGER = q
    RTRIGGER = w
    TRIANGLE = r
    CIRCLE = f
    CROSS = c
    SQUARE = d
    directional pad = cursor keys

  9. #1599
    Jesus loves me more.
    Points: 11.452, Level: 70
    Level completed: 51%, Points required for next Level: 198
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Illegal Abric Sites
    Beiträge
    1.551
    Points
    11.452
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    error: Elchika.lua:13: loop in gettable

    here is line 13
    screen:blit( 480, 272, Rock1,480,272,Rock1:width () , Rock1:hight())


  10. #1600
    QJ Gamer Blue
    Points: 4.816, Level: 44
    Level completed: 33%, Points required for next Level: 134
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Beiträge
    301
    Points
    4.816
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    well you do have height spelled incorrectly

  11. #1601
    Jesus loves me more.
    Points: 11.452, Level: 70
    Level completed: 51%, Points required for next Level: 198
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Illegal Abric Sites
    Beiträge
    1.551
    Points
    11.452
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    ty lol


  12. #1602
    <img src="images/smilies/psp.gif" border="0" alt="" title="" cl***="inlineimg" /> <img src="images/smilies/Punk.gif" border="0" alt="" title="" cl***=&
    Points: 11.105, Level: 69
    Level completed: 64%, Points required for next Level: 145
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Canada
    Beiträge
    1.944
    Points
    11.105
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von MaSt3r_ShAk3
    I get, Error: attempt to index global 'timer' (a nil value)...
    are u still getting that error??
    if your using an eboot that doesnt have that function included, you will get that error,,
    try using lua player,,

  13. #1603
    Jesus loves me more.
    Points: 11.452, Level: 70
    Level completed: 51%, Points required for next Level: 198
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Illegal Abric Sites
    Beiträge
    1.551
    Points
    11.452
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    i got the image to load but i dont see the text that is to be seen when you press a botton. it worked before the image worked


  14. #1604
    Jesus loves me more.
    Points: 11.452, Level: 70
    Level completed: 51%, Points required for next Level: 198
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Illegal Abric Sites
    Beiträge
    1.551
    Points
    11.452
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    if I have text abouve a pic. do i need the screen.waitVblankStart()

    here is an ex. of the scropt

    here is the pick
    screen:blit( 0, 0, Rock1,0,0,Rock1:width () , Rock1:height(), true)
    screen.flip()
    end
    it runs

    this is the buttons i do have valus for the keys
    if pad:l() then
    screenrint(15,252,L,red)
    end
    if pad:up() then
    screenrint(15,252,up,red)
    end
    if pad:triangle() then
    screenrint(15, 252, triangle, red)
    end
    if pad:circle() then
    screenrint(15, 252, circle, red)
    end
    if pad:cross() then
    screenrint(15, 252, cross, red)
    end
    if pad:square() then
    screenrint(15, 252, square, red)
    end
    screen.waitVblankStart()
    screen.flip()
    end


  15. #1605
    Developer
    Points: 7.499, Level: 57
    Level completed: 75%, Points required for next Level: 51
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Guadalajara
    Beiträge
    958
    Points
    7.499
    Level
    57
    Downloads
    0
    Uploads
    0

    Standard

    Does the eloader support the new luaplayer??

    Current projects:
    • pspshootoutsv0.4
    • PSPIRATESv6 :D
    • Kindom Hearths: Sora´s Adventure V0.2
    • PSPirates Alarm Clock v0.3
    • Changos!: fall of the army-ITS ALIVE AND WORKING (coming soon)

    PSPMEX DevTeam.

  16. #1606
    Jesus loves me more.
    Points: 11.452, Level: 70
    Level completed: 51%, Points required for next Level: 198
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Illegal Abric Sites
    Beiträge
    1.551
    Points
    11.452
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    i am fw 1.5


  17. #1607
    Developer
    Points: 12.360, Level: 72
    Level completed: 78%, Points required for next Level: 90
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Isle of Wight
    Beiträge
    491
    Points
    12.360
    Level
    72
    Downloads
    0
    Uploads
    0

    Standard

    No. Only .16 and below.


    PM me for a sig like this!

    http://dspspforums.com/forums/index.php SIGN UP NOW!

  18. #1608
    Developer
    Points: 7.499, Level: 57
    Level completed: 75%, Points required for next Level: 51
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Guadalajara
    Beiträge
    958
    Points
    7.499
    Level
    57
    Downloads
    0
    Uploads
    0

    Talking

    Zitat Zitat von kozine
    No. Only .16 and below.
    thanx!!!

    Current projects:
    • pspshootoutsv0.4
    • PSPIRATESv6 :D
    • Kindom Hearths: Sora´s Adventure V0.2
    • PSPirates Alarm Clock v0.3
    • Changos!: fall of the army-ITS ALIVE AND WORKING (coming soon)

    PSPMEX DevTeam.

  19. #1609
    Jesus loves me more.
    Points: 11.452, Level: 70
    Level completed: 51%, Points required for next Level: 198
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Illegal Abric Sites
    Beiträge
    1.551
    Points
    11.452
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    how should i get the Text to go above the pick , and ty guys ur all so grate


  20. #1610
    Jesus loves me more.
    Points: 11.452, Level: 70
    Level completed: 51%, Points required for next Level: 198
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Illegal Abric Sites
    Beiträge
    1.551
    Points
    11.452
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    i have tryed making where the text appers on the pick trasnparent any one know a way to get around that?


  21. #1611
    QJ Gamer Silver
    Points: 9.678, Level: 66
    Level completed: 7%, Points required for next Level: 372
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    The Migrant Fleet
    Beiträge
    908
    Points
    9.678
    Level
    66
    Downloads
    0
    Uploads
    0

    Standard

    Hey i get the error

    attempt to index a global 'mouse' <a userdata value>

    what does that mean?

  22. #1612
    QJ Gamer Bronze
    Points: 8.803, Level: 63
    Level completed: 18%, Points required for next Level: 247
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Western Australia
    Beiträge
    1.046
    Points
    8.803
    Level
    63
    Downloads
    0
    Uploads
    0

    Standard

    Hey everyone I'm making a game where you simply train a monster digimon/tamagotchi style and want to ask, how would I put a save/load function in? I have no idea.

  23. #1613
    Quality Haxing Since 1991
    Points: 29.255, Level: 99
    Level completed: 55%, Points required for next Level: 745
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Pennsylvania, USA Fi
    Beiträge
    6.206
    Points
    29.255
    Level
    99
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von PopcOrn DeVil
    Hey everyone I'm making a game where you simply train a monster digimon/tamagotchi style and want to ask, how would I put a save/load function in? I have no idea.
    The best way to do it would be to write the data to a file. It can be any file, LUA or TXT file, and you can write and overwrite data to it. The best tutorial for this can be found here: http://www.evilmana.com/tutorials/lua_tutorial_09.php
    Zitat Zitat von Noriko
    I would call you gay but I love you.


    Wait ...huh.



  24. #1614
    QJ Gamer Bronze
    Points: 8.803, Level: 63
    Level completed: 18%, Points required for next Level: 247
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Western Australia
    Beiträge
    1.046
    Points
    8.803
    Level
    63
    Downloads
    0
    Uploads
    0

    Standard

    Ok thanks dude.

  25. #1615
    Developer
    Points: 6.074, Level: 50
    Level completed: 62%, Points required for next Level: 76
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Beiträge
    270
    Points
    6.074
    Level
    50
    Downloads
    0
    Uploads
    0

    Standard

    could anyone here come up with a good AI program?...is it possible on LUA? (i'm not asking you to do it, i'm asking if you're able to do it)

    edit: also, is there a switch function? like say a = 1 and b = 2, and now i want a = 2 and b = 1, but it must simultaneously because a can't equal b.
    Geändert von ro0kie42 (04-15-2006 um 07:11 PM Uhr)

  26. #1616
    Quality Haxing Since 1991
    Points: 29.255, Level: 99
    Level completed: 55%, Points required for next Level: 745
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Pennsylvania, USA Fi
    Beiträge
    6.206
    Points
    29.255
    Level
    99
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von ro0kie42
    could anyone here come up with a good AI program?...is it possible on LUA? (i'm not asking you to do it, i'm asking if you're able to do it)

    edit: also, is there a switch function? like say a = 1 and b = 2, and now i want a = 2 and b = 1, but it must simultaneously because a can't equal b.
    For your first question, yes AI is very possible with a basic rewrite of the code, with a bunch of if statements. and for your second question i sort of answered it on AIM right now.
    Zitat Zitat von Noriko
    I would call you gay but I love you.


    Wait ...huh.



  27. #1617
    QJ Gamer Bronze
    Points: 8.803, Level: 63
    Level completed: 18%, Points required for next Level: 247
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Western Australia
    Beiträge
    1.046
    Points
    8.803
    Level
    63
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von PSPHax0r9
    The best way to do it would be to write the data to a file. It can be any file, LUA or TXT file, and you can write and overwrite data to it. The best tutorial for this can be found here: http://www.evilmana.com/tutorials/lua_tutorial_09.php
    Hey I don't see how that would help with loading data into a game like your pet's health/mood etc.

  28. #1618
    &lt;img src=&quot;images/smilies/psp.gif&quot; border=&quot;0&quot; alt=&quot;&quot; title=&quot;&quot; cl***=&quot;inlineimg&quot; /&gt; &lt;img src=&quot;images/smilies/Punk.gif&quot; border=&quot;0&quot; alt=&quot;&quot; title=&quot;&quot; cl***=&
    Points: 11.105, Level: 69
    Level completed: 64%, Points required for next Level: 145
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Canada
    Beiträge
    1.944
    Points
    11.105
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von PopcOrn DeVil
    Hey I don't see how that would help with loading data into a game like your pet's health/mood etc.
    lets say your dude has 100% health, then he hurts himself or somethin,,now his health is 90%,, then when you save you wright in the file "player.health" or "health.txt" whatever you want to call it,, 90,,
    then the next time you open your game, you call that file for the health,, and now your pet has 90 health,,

  29. #1619
    QJ Gamer Bronze
    Points: 8.803, Level: 63
    Level completed: 18%, Points required for next Level: 247
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Western Australia
    Beiträge
    1.046
    Points
    8.803
    Level
    63
    Downloads
    0
    Uploads
    0

    Standard

    *puzzled*, hmm, I might just wait for someone to release a loading type thing and I'll learn from that.

  30. #1620
    QJ Gamer Green
    Points: 5.559, Level: 48
    Level completed: 5%, Points required for next Level: 191
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    506
    Points
    5.559
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    its pretty simple if you follow the tutorial. You can almost copy past it, just adjust the var it writes to the file. Besides if someone else will have a loading function it will be the same anyways
    LUA manual:
    [url]http://www.lua.org/manual/5.0/manual.html[/url]

    LUA Wiki:
    [url]http://wiki.ps2dev.org/psp:lua_player[/url]


 

Tags for this Thread

Forumregeln

  • Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
  • Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
  • Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
  • Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.
  •  





Alle Zeitangaben in WEZ -8. Es ist jetzt 08:59 PM Uhr.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © , Caputo Media, LLC. All Rights Reserved. Cluster .