Seite 102 von 342 ErsteErste ... 2 52 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 152 202 ... LetzteLetzte
Zeige Ergebnis 3.031 bis 3.060 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; Hey everyone, hopefully I didn't miss this in the 300 pages worth of discussions we've got here, but can someone ...

  
  1. #3031
    Points: 4.143, Level: 40
    Level completed: 97%, Points required for next Level: 7
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    8
    Points
    4.143
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Hey everyone, hopefully I didn't miss this in the 300 pages worth of discussions we've got here, but can someone explain to me how to use transparencies with LUA?



  2. #3032
    sceKernelExitGame();
    Points: 19.955, Level: 89
    Level completed: 21%, Points required for next Level: 395
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    New York
    Beiträge
    3.126
    Points
    19.955
    Level
    89
    Downloads
    0
    Uploads
    0

    Standard

    ok, just make your picture delete the part you dpnt want seen, then save it as a .png <-- MOST IMPORTATNT STEP RIGHT THERE

  3. #3033
    QJ Gamer Green
    Points: 7.057, Level: 55
    Level completed: 54%, Points required for next Level: 93
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Scotland, UK
    Beiträge
    571
    Points
    7.057
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    grimfate please explain a bit clear what your dong but one quick suggestion is that in your code

    name[a] = Image.load("header..a..". png)

    put a " in it so it looks like this

    name[a] = Image.load("header"..a.." .png")

  4. #3034
    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

    Zitat Zitat von Makubesu
    Hey everyone, hopefully I didn't miss this in the 300 pages worth of discussions we've got here, but can someone explain to me how to use transparencies with LUA?
    Easy... Get some image editor that supports adding an alpha layer, then add one to a PNG, and erase w/e to transparency ;)

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


  5. #3035
    QJ Gamer Green
    Points: 7.057, Level: 55
    Level completed: 54%, Points required for next Level: 93
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Scotland, UK
    Beiträge
    571
    Points
    7.057
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    hey sg57 could you please help me with my lua animation code coz i cannot get it right

  6. #3036
    Points: 4.143, Level: 40
    Level completed: 97%, Points required for next Level: 7
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    8
    Points
    4.143
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    *tries it out*
    Wow, it even supports png-24, this is great! Thanks for your help.

  7. #3037
    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 mark.sparky
    grimfate please explain a bit clear what your dong but one quick suggestion is that in your code

    name[a] = Image.load("header..a..". png)

    put a " in it so it looks like this

    name[a] = Image.load("header"..a.." .png")
    that wont work cause 'header' has been gotten from the function, hence putting it in "" would make the image: header1.png/header2.png etc. instead of the header that i gave the function.


    explainition:

    ok, i want to load these images:

    test1.png all the way to test6.png
    char1.png to char9.png
    AND
    misc1.png to misc5.png

    i want them in their own arrays. so i made a function:

    Code:
    function make(header, frames, name)
    
      name = {}
     
        for a = 1, frames do
            name[a] = Image.load(header..a..".png")
        end
    
    end
    so that i could call it like this:

    Code:
    make(test, 6, test_array)
    make(char, 9, char_array)
    make(misc, 5, misc_array)
    BUT, i have a prob.

    when i say :

    Code:
    name = {}
    i want the name of that array to be whatever i give to that function (such as test_array, char_array, and misc_array) BUT, the function make an array named "name" insted of test_array... etc.

    i want it so that the array is named what i give the function.






    P.S. sry, its confusing i know.
    --------------------------------------------------------------------------------------

  8. #3038
    QJ Gamer Green
    Points: 7.057, Level: 55
    Level completed: 54%, Points required for next Level: 93
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Scotland, UK
    Beiträge
    571
    Points
    7.057
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    why do you want the test_array etc to be called "name" or something else
    Geändert von mark.sparky (08-01-2006 um 10:38 AM Uhr)

  9. #3039
    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 mark.sparky
    why do you want the test_array etc to be called "name" or something else

    ???

    OK, try TWO- ACTION!


    i am making an app. for it i need to load these images:


    Code:
    test1.png
    test2.png
    test3.png
    test4.png
    test5.png
    test6.png
    i want all those images in an array called:

    Code:
    test_array

    then i have ANOTHER set of images:
    Code:
    char1.png
    char2.png
    char3.png
    char4.png
    char5.png
    char6.png
    char7.png
    char8.png
    char9.png

    i want these images in an array called:

    Code:
    char_array

    i have a THIRD set of images (the last set):

    Code:
    misc1.png
    misc2.png
    misc3.png
    misc4.png
    misc5.png
    i want these images in an array called:

    Code:
    misc_array
    NOW.. i can make all the arrays and load the images by hand but its MUCH faster with a function, SO i made a function to make the array, and load the images into it:

    Code:
    function make(header, frames, name)
    
      name = {}
     
        for a = 1, frames do
            name[a] = Image.load(header..a..".png")
        end
    
    end
    NOW, i called the function like this
    Code:
    make(test, 9, test_array)
    make(char, 6, char_array)
    make(misc, 5, misc_array)
    BUT, the function does not work properly. the problem is that everytime i call it the function makes an array by the name of:

    Code:
    name
    and not the name i give it. (such as test_array, or char_array, or misc_array)


    NOW do u get it?


    BTW, i wont tell what app im making yet. ;)
    --------------------------------------------------------------------------------------

  10. #3040
    Points: 3.858, Level: 39
    Level completed: 39%, Points required for next Level: 92
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Beiträge
    12
    Points
    3.858
    Level
    39
    Downloads
    0
    Uploads
    0

    Standard this is for Grimfate

    I think this link could be handy:

    http://www.lua.org/pil/14.1.html

    I've used that before to dynamically create the name of variables, and I think that's what you want to do, right?

  11. #3041
    Developer
    Points: 4.318, Level: 41
    Level completed: 84%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    205
    Points
    4.318
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    @grimfate

    I think the problem is that since you have that "name={}" line inside the function definition, it overwrites the input variable passed to the function. I'm pretty sure that if you initialize the arrays outside of the function (right before you call the function), then pass the name of the array into the function, it will work. Does that even make sense? :)

    Basically, what I'm trying to say is change the "make" function to this:

    Code:
    function make(header, frames, name)
     
        for a = 1, frames do
            name[a] = Image.load(header..a..".png")
        end
    
    end
    And then call it like this:

    Code:
    test_array={}
    char_array={}
    misc_array={}
    make(test, 9, test_array)
    make(char, 6, char_array)
    make(misc, 5, misc_array)
    At least, that makes sense in my head.

  12. #3042
    Points: 4.143, Level: 40
    Level completed: 97%, Points required for next Level: 7
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    8
    Points
    4.143
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Won't the array generated by your function only be local to that function anyways? Give the function a return value, and call it like this:
    char_array = {}
    char array = make(char, 6)
    would be my advice.

  13. #3043
    Developer
    Points: 4.318, Level: 41
    Level completed: 84%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    205
    Points
    4.318
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Makubesu
    Won't the array generated by your function only be local to that function anyways?
    EDIT: Ah, sorry about that Makubesu, you were right! I forgot that "name" was a function input variable, which are indeed local to the function no matter how you define them inside there.
    Geändert von LMelior (08-01-2006 um 05:09 PM Uhr)

  14. #3044
    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

    LMelior, and Makubesu both of your ideas are good, BUT the nature on my program NEEDS those arguments to be inside a function.

    sry, i cant tell u what im working on yet. sry.



    xiringu: ill read that and get bak 2 u. thx!
    --------------------------------------------------------------------------------------

  15. #3045
    Developer
    Points: 4.318, Level: 41
    Level completed: 84%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    205
    Points
    4.318
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Grimfate126
    LMelior, and Makubesu both of your ideas are good, BUT the nature on my program NEEDS those arguments to be inside a function.

    sry, i cant tell u what im working on yet. sry.
    Oh I don't mind not knowing, but the result of the code that Makubesu described is exactly what you asked for - arrays of images that are named exactly as you wanted them.

    The exact results of the code you posted are in three empty, global tables named "test_array," "char_array," and "misc_array," plus a table called "name" with 9 images that is local to the "make" function. The first five images will be your miscellaneous images, the sixth image will be the last character image, and the last three images will be your last three test images.

    The exact results of the following code are three global tables with the same names as above with 9, 6, and 5 images, respectively:
    Code:
    function make(header, frames)
        local name={}
        for a = 1, frames do
            name[a] = Image.load(header..a..".png")
        end
        return name
    end
    ------
    test_array=make(test,9)
    char_array=make(char,6)
    misc_array=make(misc,5)
    You do realize that if you use your current "make" function elsewhere, you could use this code and rename the function? I can't really think of any other situation in which you'd absolutely need those three inputs.

  16. #3046
    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 LMelior
    Oh I don't mind not knowing, but the result of the code that Makubesu described is exactly what you asked for - arrays of images that are named exactly as you wanted them.

    The exact results of the code you posted are in three empty, global tables named "test_array," "char_array," and "misc_array," plus a table called "name" with 9 images that is local to the "make" function. The first five images will be your miscellaneous images, the sixth image will be the last character image, and the last three images will be your last three test images.

    The exact results of the following code are three global tables with the same names as above with 9, 6, and 5 images, respectively:
    Code:
    function make(header, frames)
        local name={}
        for a = 1, frames do
            name[a] = Image.load(header..a..".png")
        end
        return name
    end
    ------
    test_array=make(test,9)
    char_array=make(char,6)
    misc_array=make(misc,5)
    You do realize that if you use your current "make" function elsewhere, you could use this code and rename the function? I can't really think of any other situation in which you'd absolutely need those three inputs.


    yes, i totally understand. but ill release it soon once i get this prob fixed. any more ideas?
    --------------------------------------------------------------------------------------

  17. #3047
    QJ Gamer Green
    Points: 7.057, Level: 55
    Level completed: 54%, Points required for next Level: 93
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Scotland, UK
    Beiträge
    571
    Points
    7.057
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    can someone tell me what is worng with this code coz when i run it it says on line 49 'end expected (to close to 'whle' at lin 27 ) near 'elseif':

    hear is my code. line 49 and 27 is marked out.


    --function for movement and animation
    function moveAni()

    Code:
    while pad:down() do   --    line 27
    animation = animation + 1
    link[1].face = down
    link[1].y = link[1].y + 0.5
    if animation <= 6 then
    screen:blit( link[1].x, link[1].y, down1)
    end
    if animation >= 7 and animation < 14 then
    down1:clear(down2)
    end
    if animation >= 14 and animation < 21 then
    down2:clear(down3)
    end
    if animation >= 21 and animation < 28 then
    down3:clear(down4)
    end
    if animation >= 28 and animation < 35 then
    down4:clear(down1)
    end
    if animation == 35 then
    animation = 7
    end 
    elseif link[1].face == down then    -- line 49
    screen:blit( link[1].x, link[1].y, down1)
    animation = 0
    end
    end
    while pad:up() do
    animation = animation + 1
    link[1].face = up
    link[1].y = link[1].y - 0.5
    if animation <= 6 then
    screen:blit( link[1].x, link[1].y, up1)
    end
    if animation >= 7 and animation < 14 then
    up1:clear(up2)
    end
    if animation >= 14 and animation < 21 then
    up2:clear(up3)
    end
    if animation >= 21 and animation < 28 then
    up3:clear(up4)
    end
    if animation >= 28 and animation < 35 then
    up4:clear(up1)
    end
    if animation == 35 then
    animation = 7
    end
    elseif link[1].face == up then
    screen:blit( link[1].x, link[1].y, up1)
    animation = 0
    end
    end
    while pad:right() do
    animation = animation + 1
    link[1].face = right
    link[1].x = link[1].x + 0.5
    if animation <= 6 then
    screen:blit( link[1].x, link[1].y, right1)
    end
    if animation >= 7 and animation < 14 then
    right1:clear(right2)
    end
    if animation >= 14 and animation < 21 then
    right2:clear(right3)
    end
    if animation >= 21 and animation < 28 then
    right3:clear(right4)
    end
    if animation >= 28 and animation < 35 then
    right4:clear(right1)
    end
    if animation == 35 then
    animation = 7
    end
    elseif link[1].face == right then
    screen:blit( link[1].x, link[1].y, right1)
    animation = 0
    end
    end
    while pad:left() do
    animation = animation + 1
    link[1].face = down
    link[1].x = link[1].x - 0.5
    if animation <= 6 then
    screen:blit( link[1].x, link[1].y, down1)
    end
    if animation >= 7 and animation < 14 then
    down1:clear(down2)
    end
    if animation >= 14 and animation < 21 then
    down2:clear(down3)
    end
    if animation >= 21 and animation < 28 then
    down3:clear(down4)
    end
    if animation >= 28 and animation < 35 then
    down4:clear(down1)
    end
    if animation == 35 then
    animation = 7
    end
    elseif link[1].face == down then
    screen:blit( link[1].x, link[1].y, down1)
    animation = 0
    end
    end
    end

  18. #3048
    i wish i was cool
    Points: 8.661, Level: 62
    Level completed: 71%, Points required for next Level: 89
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    The Netherlands
    Beiträge
    1.257
    Points
    8.661
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von mark.sparky
    can someone tell me what is worng with this code coz when i run it it says on line 49 'end expected (to close to 'whle' at lin 27 ) near 'elseif':

    hear is my code. line 49 and 27 is marked out.


    --function for movement and animation
    function moveAni()

    Code:
    while pad:down() do   --    line 27
    animation = animation + 1
    link[1].face = down
    link[1].y = link[1].y + 0.5
    if animation <= 6 then
    screen:blit( link[1].x, link[1].y, down1)
    end
    if animation >= 7 and animation < 14 then
    down1:clear(down2)
    end
    if animation >= 14 and animation < 21 then
    down2:clear(down3)
    end
    if animation >= 21 and animation < 28 then
    down3:clear(down4)
    end
    if animation >= 28 and animation < 35 then
    down4:clear(down1)
    end
    if animation == 35 then
    animation = 7
    end 
    end -- FIXED, needed an end there ( I think)
    elseif link[1].face == down then    -- line 49
    screen:blit( link[1].x, link[1].y, down1)
    animation = 0
    end
    end
    while pad:up() do
    animation = animation + 1
    link[1].face = up
    link[1].y = link[1].y - 0.5
    if animation <= 6 then
    screen:blit( link[1].x, link[1].y, up1)
    end
    if animation >= 7 and animation < 14 then
    up1:clear(up2)
    end
    if animation >= 14 and animation < 21 then
    up2:clear(up3)
    end
    if animation >= 21 and animation < 28 then
    up3:clear(up4)
    end
    if animation >= 28 and animation < 35 then
    up4:clear(up1)
    end
    if animation == 35 then
    animation = 7
    end
    elseif link[1].face == up then
    screen:blit( link[1].x, link[1].y, up1)
    animation = 0
    end
    end
    while pad:right() do
    animation = animation + 1
    link[1].face = right
    link[1].x = link[1].x + 0.5
    if animation <= 6 then
    screen:blit( link[1].x, link[1].y, right1)
    end
    if animation >= 7 and animation < 14 then
    right1:clear(right2)
    end
    if animation >= 14 and animation < 21 then
    right2:clear(right3)
    end
    if animation >= 21 and animation < 28 then
    right3:clear(right4)
    end
    if animation >= 28 and animation < 35 then
    right4:clear(right1)
    end
    if animation == 35 then
    animation = 7
    end
    elseif link[1].face == right then
    screen:blit( link[1].x, link[1].y, right1)
    animation = 0
    end
    end
    while pad:left() do
    animation = animation + 1
    link[1].face = down
    link[1].x = link[1].x - 0.5
    if animation <= 6 then
    screen:blit( link[1].x, link[1].y, down1)
    end
    if animation >= 7 and animation < 14 then
    down1:clear(down2)
    end
    if animation >= 14 and animation < 21 then
    down2:clear(down3)
    end
    if animation >= 21 and animation < 28 then
    down3:clear(down4)
    end
    if animation >= 28 and animation < 35 then
    down4:clear(down1)
    end
    if animation == 35 then
    animation = 7
    end
    elseif link[1].face == down then
    screen:blit( link[1].x, link[1].y, down1)
    animation = 0
    end
    end
    end
    look at line 49.

  19. #3049
    QJ Gamer Green
    Points: 7.057, Level: 55
    Level completed: 54%, Points required for next Level: 93
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Scotland, UK
    Beiträge
    571
    Points
    7.057
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    ok thnx ill try that
    -= Double Post =-
    that doesnt work coz now it says "line 50 erorr: 'end' expected (to colse function at line 25) near 'elseif'
    Geändert von mark.sparky (08-02-2006 um 03:01 AM Uhr) Grund: Automerged Doublepost

  20. #3050
    i wish i was cool
    Points: 8.661, Level: 62
    Level completed: 71%, Points required for next Level: 89
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    The Netherlands
    Beiträge
    1.257
    Points
    8.661
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    oh, I don't know what's the problem then, sorry. maybe put the end under the animation = 0 line at line 49?

  21. #3051
    QJ Gamer Green
    Points: 7.057, Level: 55
    Level completed: 54%, Points required for next Level: 93
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Scotland, UK
    Beiträge
    571
    Points
    7.057
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    but if i do that then it will end that function will it not

  22. #3052
    i wish i was cool
    Points: 8.661, Level: 62
    Level completed: 71%, Points required for next Level: 89
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    The Netherlands
    Beiträge
    1.257
    Points
    8.661
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    probably.

  23. #3053
    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

    well. It means you have missed out an end somewhere
    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

  24. #3054
    QJ Gamer Green
    Points: 7.057, Level: 55
    Level completed: 54%, Points required for next Level: 93
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Scotland, UK
    Beiträge
    571
    Points
    7.057
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    well alex can you look at the code

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

    ok, what page is it on?
    -= Double Post =-
    im leaving any second now, soo i might now have time to help
    Geändert von Glynnder (08-02-2006 um 04:40 AM Uhr) Grund: Automerged Doublepost
    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

  26. #3056
    Developer
    Points: 4.318, Level: 41
    Level completed: 84%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    205
    Points
    4.318
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    The problem is that you end all of your "if" statements. You can't have an "elseif" if there are no open "if" statements. You aren't using "elseif" correctly. The reason it is good to use "elseif" is because the first time that any one of those statements triggers, the code will skip the rest of the "elseif" choices.

    So, the best way for your code to be written is:

    Code:
    if a then
    -- do one thing
    elseif b then
    -- do something else
    elseif c then
    -- do something else
    else
    -- do the default action
    end
    To answer your question directly, you did not need an extra end there, but you should have taken the one that was there out! But it would be easier to understand if you wrote it as above.

  27. #3057
    QJ Gamer Green
    Points: 7.057, Level: 55
    Level completed: 54%, Points required for next Level: 93
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Scotland, UK
    Beiträge
    571
    Points
    7.057
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    bu the only probably them with that is that i have started the whole animation with a while loop. So cna you not write elseif in a whlie loop

  28. #3058
    Developer
    Points: 4.318, Level: 41
    Level completed: 84%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    205
    Points
    4.318
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von mark.sparky
    bu the only probably them with that is that i have started the whole animation with a while loop. So cna you not write elseif in a whlie loop
    Yes, you can. I recommend using an editor that has syntax highlighting and automatic tabs, because it makes finding errors like that a ton easier. Take a look at the following: no more forgetting what "end" goes with what function.

    Code:
    while pad:down() do
        if a then
            -- do one thing
        elseif b then
            -- do something else
        elseif c then
            -- do something else
        else
            -- do the default action
        end
    end

  29. #3059
    QJ Gamer Green
    Points: 7.057, Level: 55
    Level completed: 54%, Points required for next Level: 93
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Scotland, UK
    Beiträge
    571
    Points
    7.057
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    ok ill try that and i use Context text editor

  30. #3060
    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

    how would i send a file with IrDA?
    -= Double Post =-
    load it into and agrgument and then save the arugument to the other PSP?

    would that work.
    -= Double Post =-
    so
    gogo = file.ioopen(entry.name)

    system.irdawrite(gogo)
    blah blah

    then on the other PSP

    blah blah.
    system.idraread(gogo)
    file.iosave(gogo)
    Geändert von Glynnder (08-02-2006 um 06:18 AM Uhr) Grund: Automerged Doublepost
    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


 

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 .