Seite 80 von 342 ErsteErste ... 30 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 130 180 ... LetzteLetzte
Zeige Ergebnis 2.371 bis 2.400 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; Zitat von Grimfate126 sorry for double post, but have a prob. i tried to do this: Code: for c = ...

  
  1. #2371
    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

    Zitat Zitat von Grimfate126
    sorry for double post, but have a prob.

    i tried to do this:

    Code:
    for c = 1, 18 do
    
    desert..c = Image.load("sp/desert"..c..".png")
    
    end
    but it says this:

    Error: "=" expedcted near ".."

    i know its not the image loading part. so what is worng??
    I dont know much about the "for" statement.. but try this

    Code:
    for c = 1, 18 do
    
    desert = Image.load("sp/desert"..c..".png")
    
    end



  2. #2372
    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 montrob
    I dont know much about the "for" statement.. but try this

    Code:
    for c = 1, 18 do
    
    desert = Image.load("sp/desert"..c..".png")
    
    end

    that wont work cause i want it like this:
    Code:
    desert1 = Image.load("sp/desert1.png")
    desert2 = Image.load("sp/desert2.png")
    and so on...
    BUT when i do that, it doesnt load all the images, in luaplayer PSP, for luaplayer windows, it works awesomely. why?
    --------------------------------------------------------------------------------------

  3. #2373
    Rock Star
    Points: 70.899, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Aug 2005
    Ort
    CT| FW: 4.01 M33-2
    Beiträge
    11.844
    Points
    70.899
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    Thats strange if it works in LuaPlayerWindows it should work in LuaPlayerPSP. What version of LuaPlayer are you using on your PSP? I know LuaPlayerWindows is 0.16. Try having the same version, not sure if that would make a difference though.


  4. #2374
    is not posting very often
    Points: 33.152, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 99,6%

    Registriert seit
    Feb 2006
    Ort
    omnipresent
    Beiträge
    5.162
    Points
    33.152
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    luaplayerwindows is 0.14
    What did we think the world would look like in 2015?

    Zitat Zitat von Abe
    Either way, if you don't know, don't guess. Stick to answering questions about stuff you're qualified to answer, like Pokemon questions or something along those lines.
    http://forums.qj.net/501501-post26.html

  5. #2375
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    that wouldnt work montrob, he wants to load many images in one 'for' loop. by taking out the "..c", you take out what he's using to load multiple images.
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  6. #2376
    QJ Gamer Blue
    Points: 4.561, Level: 43
    Level completed: 6%, Points required for next Level: 189
    Overall activity: 0%

    Registriert seit
    May 2006
    Beiträge
    224
    Points
    4.561
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von slicer4ever
    what's wrong? what error are you getting?
    well when i do it, it clears the image i quess, yet makes the whole screen a greenish color.

  7. #2377
    QJ Gamer Blue
    Points: 4.561, Level: 43
    Level completed: 6%, Points required for next Level: 189
    Overall activity: 0%

    Registriert seit
    May 2006
    Beiträge
    224
    Points
    4.561
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    btw, my code is on the previous page.

  8. #2378
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    ok well then try this:

    playervisible = yes

    if playervisible == yes then
    screen:blit(0,0,player)
    end

    that should work
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  9. #2379
    is not posting very often
    Points: 33.152, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 99,6%

    Registriert seit
    Feb 2006
    Ort
    omnipresent
    Beiträge
    5.162
    Points
    33.152
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    who's that playervisible script for?
    What did we think the world would look like in 2015?

    Zitat Zitat von Abe
    Either way, if you don't know, don't guess. Stick to answering questions about stuff you're qualified to answer, like Pokemon questions or something along those lines.
    http://forums.qj.net/501501-post26.html

  10. #2380
    QJ Gamer Blue
    Points: 4.561, Level: 43
    Level completed: 6%, Points required for next Level: 189
    Overall activity: 0%

    Registriert seit
    May 2006
    Beiträge
    224
    Points
    4.561
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    no that won't help, i want to just clear the image, and not the whole screen thats all i am trying to do. Does anyone know how. Like lets say you display a person, and then when you press x it clears that person, yet everything else stays. Also, if you can do this then like if you used screen:blit to paste grass everywhere, and then blited the person on top of the grass, would the grass be shown underneath once you cleared the person.

  11. #2381
    QJ Gamer Blue
    Points: 4.561, Level: 43
    Level completed: 6%, Points required for next Level: 189
    Overall activity: 0%

    Registriert seit
    May 2006
    Beiträge
    224
    Points
    4.561
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    also, is there anyone that i can e-mail my code to and see where my bugs are. Its really simple, yet since i am a very begginner in lua, I am not sure what is wrong. Thanks, my E-mail is [email protected] . If you can help me e-mail me or post here.

  12. #2382
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von emericaska8r
    also, is there anyone that i can e-mail my code to and see where my bugs are. Its really simple, yet since i am a very begginner in lua, I am not sure what is wrong. Thanks, my E-mail is [email protected] . If you can help me e-mail me or post here.
    I'll give it a shot.
    [email protected]
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  13. #2383
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von emericaska8r
    no that won't help, i want to just clear the image, and not the whole screen thats all i am trying to do. Does anyone know how. Like lets say you display a person, and then when you press x it clears that person, yet everything else stays.
    I hear people saying that this will work:

    Code:
    screen:clear(image name here)
    Have you tried it?

    Zitat Zitat von emericaska8r
    Also, if you can do this then like if you used screen:blit to paste grass everywhere, and then blited the person on top of the grass, would the grass be shown underneath once you cleared the person.
    It should.
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  14. #2384
    Points: 5.745, Level: 48
    Level completed: 98%, Points required for next Level: 5
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    404
    Points
    5.745
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Hi I have a question:
    Code:
    if player1.x >= 100 and player1.x <= 116 and player1.y >= 200 and player1.y <= 216 then
    picture = true
    end
    The code above dosent work but an example.
    My question is:
    I have a picture "player1" somewhere in the psp screen.
    Is it possible to make the picture "player1" to have x and y axis so when "picture1" goes to that place, picture will be true.

    You may think of doing
    Code:
    -------picture1 somewhere in the txt
    screen:blit(x0, y0, player1)
    
    ---
    
    if x0 >= 100 and x0 <= 116 and y0 >= 200 and y0 <= 216 then
    pause = true
    end
    but this i know.
    with this code above, not the hole picture1 that if it touches the x and y axis it will be true.
    Bequiet!!!
    I'm learning cc©cc

  15. #2385
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von natan333
    Hi I have a question:
    Code:
    if player1.x >= 100 and player1.x <= 116 and player1.y >= 200 and player1.y <= 216 then
    picture = true
    end
    The code above dosent work but an example.
    My question is:
    I have a picture "player1" somewhere in the psp screen.
    Is it possible to make the picture "player1" to have x and y axis so when "picture1" goes to that place, picture will be true.

    You may think of doing
    Code:
    -------picture1 somewhere in the txt
    screen:blit(x0, y0, player1)
    
    ---
    
    if x0 >= 100 and x0 <= 116 and y0 >= 200 and y0 <= 216 then
    pause = true
    end
    but this i know.
    with this code above, not the hole picture1 that if it touches the x and y axis it will be true.
    wait, you want it so that if part of the pic is in a specific place it becomes true, or when the whole thing goes into the specific place?
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  16. #2386
    Points: 5.745, Level: 48
    Level completed: 98%, Points required for next Level: 5
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    404
    Points
    5.745
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von EminentJonFrost
    wait, you want it so that if part of the pic is in a specific place it becomes true, or when the whole thing goes into the specific place?
    ok. imagen if picture "player1" is big but not 2 big


    Code:
    -------picture1 somewhere in the txt
    screen:blit(x0, y0, player1)
    
    ---
    
    if x0 >= 100 and x0 <= 116 and y0 >= 200 and y0 <= 216 then
    pause = true
    end
    if the bottom of the big picture "player1" touches the x and y axis to be true, it will not do nothing.
    if the topleft of the picture touches the x and y axis, it will turn true

    the thing i want to know if its possible for any part of the big "player1"
    picture to hit the x, y axis to be true

    but hey, picture "player1" is a moving picture
    Geändert von natan333 (05-19-2006 um 04:10 PM Uhr)
    Bequiet!!!
    I'm learning cc©cc

  17. #2387
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von natan333
    ok. imagen if picture "player1" is big but not 2 big


    Code:
    -------picture1 somewhere in the txt
    screen:blit(x0, y0, player1)
    
    ---
    
    if x0 >= 100 and x0 <= 116 and y0 >= 200 and y0 <= 216 then
    pause = true
    end
    if the bottom of the big picture "player1" touches the x and y axis to be true, it will not do nothing.
    if the topleft of the picture touches the x and y axis, it will turn true

    the thing i want to know if its possible for any part of the big "player1"
    picture to hit the x, y axis to be true
    I dont believe so...no, not possible.
    If you had several images "stringed" together, then yes, it would be possible since all you would need to do is make the small images you want "true"..true. lol
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  18. #2388
    Points: 5.745, Level: 48
    Level completed: 98%, Points required for next Level: 5
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    404
    Points
    5.745
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von EminentJonFrost
    I dont believe so...no, not possible.
    If you had several images "stringed" together, then yes, it would be possible since all you would need to do is make the small images you want "true"..true. lol

    if with picture isnt possible, i think its possible to add a moving invisible square around the picture "player1" so when it hits the x, y axis it will be true.
    but i not idea how to make it
    Geändert von natan333 (05-19-2006 um 04:18 PM Uhr)
    Bequiet!!!
    I'm learning cc©cc

  19. #2389
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von natan333
    if with picture isnt possible, i think its possible to add a moving invisible square around the picture "player1" so when it hits the x, y axis it will be true.
    but i not idea how to make it
    what do you mean you dont know how to make it? its the same as any other photo.
    just be sure that the "player" pic is blitted AFTER the square, and make the square become true when you want it to.


    Code:
    -------picture1 somewhere in the txt
    screen:blit(x1, y1, square, false)
    --screen:blit(x0, y0, player1) -- Move this...
    
    ---
    
    if whatever = whatever then
    screen:blit(x1, y1, square, true)
    end
    
    --here, right after the square is blitted.
    screen:blit(x0, y0, player1)
    
    if x0 >= 100 and x0 <= 116 and y0 >= 200 and y0 <= 216 then
    pause = true
    end
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  20. #2390
    Points: 5.745, Level: 48
    Level completed: 98%, Points required for next Level: 5
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    404
    Points
    5.745
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    yeah did kinda the way you said for bunch of pictures
    i did with adding dots arround the picture and making them x0+(number), y0+(number) :Jump:
    hey is there a invisible color ? so it dosent show up?
    Bequiet!!!
    I'm learning cc©cc

  21. #2391
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von natan333
    yeah did kinda the way you said for bunch of pictures
    i did with adding dots arround the picture and making them x0+(number), y0+(number) :Jump:
    hey is there a invisible color ? so it dosent show up?
    um...you could not blit it. :icon_wink
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  22. #2392
    Points: 5.745, Level: 48
    Level completed: 98%, Points required for next Level: 5
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    404
    Points
    5.745
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    hmm, dont got it

    is there a way to make
    Code:
    screen:drawLine(x0, y0+15, x0, y0+15)
    with no color ?
    Bequiet!!!
    I'm learning cc©cc

  23. #2393
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    nope.
    curious, why draw am invisible line?
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  24. #2394
    Points: 5.745, Level: 48
    Level completed: 98%, Points required for next Level: 5
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    404
    Points
    5.745
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von EminentJonFrost
    nope.
    curious, why draw am invisible line?
    well, becuase this picture have an invisible square (if you put in the screen and move arround), and the dots is to put in the top right side, bottom right side and left. top left side dont need becuase picture1 is included with them all x0, and y0 so when it touches the x and y axis in a place i mark, it will change to something.

    but hey. i might put a invisible picture with only 1 pixel to do it :icon_wink
    Bequiet!!!
    I'm learning cc©cc

  25. #2395
    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

    Zitat Zitat von natan333
    hmm, dont got it

    is there a way to make
    Code:
    screen:drawLine(x0, y0+15, x0, y0+15)
    with no color ?
    Yes but you have to draw it to another image then the screen. Then you blit that image to the screen but with alpha set to 255.

    So something like this:
    Code:
    invis:drawLine(x0, y0+15, x0, y0+15)
    screen:blit(0, 0, invis, 0, 0,invis:width(),invis:height(),true)
    LUA manual:
    [url]http://www.lua.org/manual/5.0/manual.html[/url]

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

  26. #2396
    Points: 5.745, Level: 48
    Level completed: 98%, Points required for next Level: 5
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    404
    Points
    5.745
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    guys, is there a software that records every sound, that comes out from the soundbox or headphone?

    example:
    record a jump sound from a game
    Geändert von natan333 (05-20-2006 um 12:16 PM Uhr)
    Bequiet!!!
    I'm learning cc©cc

  27. #2397
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    yes... i just recorded the streaming Dont Wait from the website now i have the song for free... You can take the sound from: Speakers, Sound Card, Microphone, Web cam, etc.

    Its called ReplayMusic. A DEMO version is out.. allows 25 tracks t be recorded, just click start, do the sound from game, then stop recording, then convert or whatever...

    P.S. Anyone know what an LG Cingular C1500 Cell Phone's ringtone codec is? I have this converter, just dunno what codec it is in...

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here


  28. #2398
    Points: 5.745, Level: 48
    Level completed: 98%, Points required for next Level: 5
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    404
    Points
    5.745
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    hehehe . i got a registration code . but not sure if its registered becuase it crashed
    Bequiet!!!
    I'm learning cc©cc

  29. #2399
    QJ Gamer Gold
    Points: 18.627, Level: 86
    Level completed: 56%, Points required for next Level: 223
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    LOLWUT
    Beiträge
    2.625
    Points
    18.627
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    I am having trouble with this code. I get the error: index.lua 28 'then' expected near '='. :Argh: :Argh: :Argh: The code:
    Code:
    red = Color.new(255,0,0)
    yellow = Color.new(255, 255, 0)
    blue = Color.new(0, 0, 255)
    orange = Color.new(223, 88, 6)
    grey = Color.new(94, 97, 111)
    black = Color.new(0, 0, 0)
    white = Color.new(255, 255, 255)
    green = Color.new(0,255,0)
    
    duh = Timer.new()
    duh2 = duh:time()
    x = 470
    y = 0
    duh:start()
    
    man = Image.load("man.png")
    
    while true do
    screen:clear(white)
    
    if duh2 >= 470 then
    screen:blit(470,0,man)
    end
    
    screen:blit(x,y,man)
    
    for i = 1, 470 do
    if duh2 = i * 1 then
    man.x = man.x + 1
    end
    
    screen.waitVblankStart()
    screen.flip()
    end
    The line that is bolded is line 28.

  30. #2400
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    me 2 ;) i bought it ;) now i just need to fix my internet/text messaing on my cell to download my ripped song... after finding what ringtone codec it is in...

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here



 

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 09:01 PM Uhr.

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