Seite 167 von 342 ErsteErste ... 67 117 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 217 267 ... LetzteLetzte
Zeige Ergebnis 4.981 bis 5.010 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; Agh, I fixed my fps meter and now I see that its running at only 20 fps at best on ...

  
  1. #4981
    QJ Gamer Silver
    Points: 7.740, Level: 58
    Level completed: 95%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    608
    Points
    7.740
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Agh, I fixed my fps meter and now I see that its running at only 20 fps at best on the psp! Help



  2. #4982
    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 yaustar
    Write your own or extend animlib to unload any animation frame images that are not being used from memory and load the frames that you need next or only load the images you need for the current frame. It be relatively slow but you have no choice since you are running out of memory.

    Why on earth would you need 100 frames for an animation any way?

    animlib does support freeing animations. (which literally frees all the images for that animation) just simply do:

    animName:free()

    and it will declare the image files as nil, and perform a garbagecollect().
    -= Double Post =-
    Zitat Zitat von Dark_Merlin
    Agh, I fixed my fps meter and now I see that its running at only 20 fps at best on the psp! Help

    20 FPS?!?? post your code. i think youre timer is still messed up, but it could be your code as well.
    Geändert von Grimfate126 (01-10-2007 um 07:04 PM Uhr) Grund: Automerged Doublepost
    --------------------------------------------------------------------------------------

  3. #4983
    QJ Gamer Blue
    Points: 6.041, Level: 50
    Level completed: 46%, Points required for next Level: 109
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Missouri
    Beiträge
    451
    Points
    6.041
    Level
    50
    Downloads
    0
    Uploads
    0

    Standard

    Thanks EminentJonFrost. That fixed EVERYTHING lol.

  4. #4984
    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 Dark_Merlin
    >_< Can someone help me with my code, it is really slow and the fps meter shows 0 all the time.

    Heres the files http://upload.team-duck.com/users/Da...0Espionage.rar

    ok, i took a quick look at that code, and here are some ways to improve it:


    1. Colors.lua is a simple waste of memory. no game uses that many colors. so many colors will limit your ram. only keep the colors that you use.

    2. requireC. whats the point of this?

    3. bullets. you have too many directions. if you want it that way, use my tutorial which teaches you to shoot anywhere you want, and modify it.

    4. elseif's. start using them.
    --------------------------------------------------------------------------------------

  5. #4985
    QJ Gamer Silver
    Points: 7.740, Level: 58
    Level completed: 95%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    608
    Points
    7.740
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Grimfate126
    ok, i took a quick look at that code, and here are some ways to improve it:


    1. Colors.lua is a simple waste of memory. no game uses that many colors. so many colors will limit your ram. only keep the colors that you use.

    2. requireC. whats the point of this?

    3. bullets. you have too many directions. if you want it that way, use my tutorial which teaches you to shoot anywhere you want, and modify it.

    4. elseif's. start using them.
    Can do, but what would a good fps speed be?

  6. #4986
    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 Dark_Merlin
    Can do, but what would a good fps speed be?

    try to get at least 50-55. 60 is max. if you get atlest 50, ill tell you a way to make it 60, but its super secret.
    --------------------------------------------------------------------------------------

  7. #4987
    QJ Gamer Silver
    Points: 7.740, Level: 58
    Level completed: 95%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    608
    Points
    7.740
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    50... hmm ok.

    Nice tut btw! Amazing and almost EXACTLY what i wanted :)

    Oh and to get it to 60, overclock ;)

  8. #4988
    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 Dark_Merlin
    50... hmm ok.

    Nice tut btw! Amazing and almost EXACTLY what i wanted :)

    Oh and to get it to 60, overclock ;)

    damn it. mind reader. lol. thanks for the compliment. :)
    --------------------------------------------------------------------------------------

  9. #4989
    QJ Gamer Blue
    Points: 4.936, Level: 44
    Level completed: 93%, Points required for next Level: 14
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    In the shadows..
    Beiträge
    135
    Points
    4.936
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    anyone gonna help me on my question?..

  10. #4990
    QJ Gamer Silver
    Points: 7.740, Level: 58
    Level completed: 95%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    608
    Points
    7.740
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Hmm, slight problem

    When moving and shooting it goes really weird o_O

    Ill look at it and see what causes it...

    EDIT: Fixed =)
    -= Double Post =-
    Well I get a constant non-dipping 30fps :)
    Geändert von Dark_Merlin (01-11-2007 um 12:08 AM Uhr) Grund: Automerged Doublepost

  11. #4991
    QJ Gamer Silver
    Points: 8.002, Level: 60
    Level completed: 26%, Points required for next Level: 148
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    The Matrix
    Beiträge
    1.090
    Points
    8.002
    Level
    60
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von CoolRaccoon
    i was wondering how to delete a directory and ALL its files, like deleting "/psp/game/mygame/temp/" then "*.*"
    -= Double Post =-
    i tried
    Code:
    System.removeFile("*.*")
    Didn't work
    quotes
    http://i28.tinypic.com/1znoljt.png
    lolololololol - Reach 100,000 Gamerscore

  12. #4992
    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 xmOD
    anyone gonna help me on my question?..
    just letting you know, your not being ignored. you just have a genuinely tough to understand problem. i have no clue how that number sentence you posted translates to a coordinate on the screen. didnt what i post in your old thread help at all?
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  13. #4993
    QJ Gamer Silver
    Points: 8.002, Level: 60
    Level completed: 26%, Points required for next Level: 148
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    The Matrix
    Beiträge
    1.090
    Points
    8.002
    Level
    60
    Downloads
    0
    Uploads
    0

    Standard

    help please?
    http://i28.tinypic.com/1znoljt.png
    lolololololol - Reach 100,000 Gamerscore

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

    Your problem?

    XMod - I dont know what to tell you... file:seek("set",byte) should work by 'set'ing the current position in the 'file' stream to 'byte'... Maybe youll need to convert the number returned to ASCII, so cut it into 2's, then make them a char...

    EDIT

    Ohhhh theres your problem i think... Try now printing whatever is in the 'file'. I dunno how to do that in Lua, youll probably need to first file:read 4 bytes into a buffer/string and then print it out... Ill make a little snippet now for you to try ;)


    Code:
    offset = OFFSET_#_HERE
    num_digits = NUM_#s_AFTER_OFFSET_TO_READ
    data = ""
    
    file = io.open(filename_here, "r")
    if file then
            file:seek("set", offset)
    	data = file:read(num_digits)
    	file:close()
    end
    screen:print(0,0,data,Color.new(255,255,255))
    So say you had the text "Hello" at the offset 1124 in a file called SG57.reg...
    Code:
    data = ""
    
    file = io.open("SG57.reg", "r")
    if file then
            file:seek("set", 1124)
    	data = file:read(5)
    	file:close()
    end
    screen:print(0,0,data,Color.new(255,255,255))
    Say yo uhave the VALUE '31010' at offset 1224 in a file called SG57.reg... you want toretrieve the value:
    Code:
    data = 0
    
    file = io.open("SG57.reg", "r")
    if file then
            file:seek("set", 1124)
    	data = file:read("*n",5)
    	file:close()
    end
    screen:print(0,0,data,Color.new(255,255,255))
    See if something like that works...



    GOOD reference:
    Code:
    file:read (format1, ...)
    
    Reads the file file, according to the given formats, which specify what to read. For each format, the function returns a string (or a number) with the characters read, or nil if it cannot read data with the specified format. When called without formats, it uses a default format that reads the entire next line (see below).
    
    The available formats are
    
        * "*n" reads a number; this is the only format that returns a number instead of a string.
        * "*a" reads the whole file, starting at the current position. On end of file, it returns the empty string.
        * "*l" reads the next line (skipping the end of line), returning nil on end of file. This is the default format.
        * number reads a string with up to this number of characters, returning nil on end of file. If number is zero, it reads nothing and returns an empty string, or nil on end of file. 
    
    file:seek ([whence] [, offset])
    
    Sets and gets the file position, measured from the beginning of the file, to the position given by offset plus a base specified by the string whence, as follows:
    
        * "set" --- base is position 0 (beginning of the file);
        * "cur" --- base is current position;
        * "end" --- base is end of file; 
    
    In case of success, function seek returns the final file position, measured in bytes from the beginning of the file. If this function fails, it returns nil, plus a string describing the error.
    
    The default value for whence is "cur", and for offset is 0. Therefore, the call file:seek() returns the current file position, without changing it; the call file:seek("set") sets the position to the beginning of the file (and returns 0); and the call file:seek("end") sets the position to the end of the file, and returns its size.
    Geändert von SG57 (01-11-2007 um 05:36 PM Uhr) Grund: Automerged Doublepost

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


  15. #4995
    QJ Gamer Silver
    Points: 8.002, Level: 60
    Level completed: 26%, Points required for next Level: 148
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    The Matrix
    Beiträge
    1.090
    Points
    8.002
    Level
    60
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von SG57
    Your problem?
    look at the top of the page (my post with quote)
    http://i28.tinypic.com/1znoljt.png
    lolololololol - Reach 100,000 Gamerscore

  16. #4996
    QJ Gamer Bronze
    Points: 9.316, Level: 64
    Level completed: 89%, Points required for next Level: 34
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Denmark
    Beiträge
    664
    Points
    9.316
    Level
    64
    Downloads
    0
    Uploads
    0

    Standard

    Hi all Lua Coders!


    I'm currently working on a kind of browser system... im not so good at explaining, its kinda like PSPWindows.

    But now i need, when my cursor is "over" a button, and i press X, then the button will blit itself into a "pressed button sprite" and it will blit a new image over itself, just like the start menu in windows.

    Don't say the work "Collosion" to me, because i simply can't get that to work in any of my creations.
    My PSP Projects:
    ___________________
    None.

  17. #4997
    QJ Gamer Silver
    Points: 7.278, Level: 56
    Level completed: 64%, Points required for next Level: 72
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    Pimp'en in the US F#
    Beiträge
    1.254
    Points
    7.278
    Level
    56
    Downloads
    0
    Uploads
    0

    Standard

    hehe "Collosion"..any way, do you know the "button's" X and Y value? if so, just make an if statement like....
    Code:
    if (insert Cursor X value here) >= (insert Button x value) and (Cursor Y value) and (Cursor X) <= (edge of the Button's X value) and (Cursor Y) <= (edge of Button's Y value) then
    blablabla if statement stuff bla
    blaOMGLOL11!!1!
    end
    it go like that, but really.. "collosion" would be pretty use fill there, instead of using the big IF statement.
    The Wentire Worls in two Sectors....
    When did I get dev statz?
    Spoiler for my PSP homebrewReleases:
    Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
    (PvP Pong DL'ed well over 2403 times combined! get yours now!)
    Spoiler for Great Quotes:

    "No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.

  18. #4998
    QJ Gamer Bronze
    Points: 9.316, Level: 64
    Level completed: 89%, Points required for next Level: 34
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Denmark
    Beiträge
    664
    Points
    9.316
    Level
    64
    Downloads
    0
    Uploads
    0

    Standard

    That might help, i'll just post here where i need it:

    Cursor = { x = 230, y = 140 }

    while true do

    pad = Controls.read()

    screen:clear()
    screen:blit(0, 0, background, false)
    screen:blit(Cursor.x, Cursor.y, Cursor1, true)
    screen:blit(0, 246, menu, false)
    screen.flip()

    if pad:left() then
    Cursor.x = Cursor.x -2
    end

    if pad:right() then
    Cursor.x = Cursor.x +2
    end

    if pad:up() then
    Cursor.y = Cursor.y -2
    end

    if pad:down() then
    Cursor.y = Cursor.y +2
    end

    (Then here goes Blacksharks code, like: if pad:cross() and (All those variables) then blablabla blitting images,
    end)

    if pad:start() then
    break
    end

    end
    My PSP Projects:
    ___________________
    None.

  19. #4999
    QJ Gamer Bronze
    Points: 9.316, Level: 64
    Level completed: 89%, Points required for next Level: 34
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Denmark
    Beiträge
    664
    Points
    9.316
    Level
    64
    Downloads
    0
    Uploads
    0

    Standard

    That might help, i'll just post here where i need it:

    Cursor = { x = 230, y = 140 }

    while true do

    pad = Controls.read()

    screen:clear()
    screen:blit(0, 0, background, false)
    screen:blit(Cursor.x, Cursor.y, Cursor1, true)
    screen:blit(0, 246, menu, false)
    screen.flip()

    if pad:left() then
    Cursor.x = Cursor.x -2
    end

    if pad:right() then
    Cursor.x = Cursor.x +2
    end

    if pad:up() then
    Cursor.y = Cursor.y -2
    end

    if pad:down() then
    Cursor.y = Cursor.y +2
    end

    (Then here goes Blacksharks code, like: if pad:cross() and (All those variables) then blablabla blitting images,
    end)

    if pad:start() then
    break
    end

    end
    EDIT: Dammit, double post. Delete this post please, mods.
    My PSP Projects:
    ___________________
    None.

  20. #5000
    QJ Gamer Silver
    Points: 7.278, Level: 56
    Level completed: 64%, Points required for next Level: 72
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    Pimp'en in the US F#
    Beiträge
    1.254
    Points
    7.278
    Level
    56
    Downloads
    0
    Uploads
    0

    Standard

    Alrighty, try this..

    Code:
    while true do
    
    pad = Controls.read()
    
    screen:clear()
    screen:blit(0, 0, background, false)
    screen:blit(Cursor.x, Cursor.y, Cursor1, true)
    screen:blit(0, 246, menu, false)
    screen.flip()
    
    if pad:left() then
    Cursor.x = Cursor.x -2
    end
    
    if pad:right() then
    Cursor.x = Cursor.x +2
    end
    
    if pad:up() then
    Cursor.y = Cursor.y -2
    end
    
    if pad:down() then
    Cursor.y = Cursor.y +2
    end
    
    if pad:cross() and Cursor.x >= Button.x and Cursor.y >= Button.y and Cursor.x <= (x value of the Right side of the button) and Cursor.y <= (bottom of Button's Y value) then
    do if statement stuff here
    blit an image or 2
    crazyomglol
    getdrunk
    end
    
    if pad:start() then
    break
    end
    But make sure to get the X and Y value of the far Right of the button image and the
    Bottom of the Image, and replace the parenthesis with them. if you have any troubles then PM me with like the images or something...but give that a try first!

    now, theres a much more efficient way of doing this but that involves "collosion" and functions.
    The Wentire Worls in two Sectors....
    When did I get dev statz?
    Spoiler for my PSP homebrewReleases:
    Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
    (PvP Pong DL'ed well over 2403 times combined! get yours now!)
    Spoiler for Great Quotes:

    "No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.

  21. #5001
    Ponies and Unicorns
    Points: 5.778, Level: 49
    Level completed: 14%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Pelennor Fields
    Beiträge
    547
    Points
    5.778
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von BlackShark
    Alrighty, try this..

    Code:
    while true do
    
    pad = Controls.read()
    
    screen:clear()
    screen:blit(0, 0, background, false)
    screen:blit(Cursor.x, Cursor.y, Cursor1, true)
    screen:blit(0, 246, menu, false)
    screen.flip()
    
    if pad:left() then
    Cursor.x = Cursor.x -2
    end
    
    if pad:right() then
    Cursor.x = Cursor.x +2
    end
    
    if pad:up() then
    Cursor.y = Cursor.y -2
    end
    
    if pad:down() then
    Cursor.y = Cursor.y +2
    end
    
    if pad:cross() and Cursor.x >= Button.x and Cursor.y >= Button.y and Cursor.x <= (x value of the Right side of the button) and Cursor.y <= (bottom of Button's Y value) then
    do if statement stuff here
    blit an image or 2
    crazyomglol
    getdrunk
    end
    
    if pad:start() then
    break
    end
    But make sure to get the X and Y value of the far Right of the button image and the
    Bottom of the Image, and replace the parenthesis with them. if you have any troubles then PM me with like the images or something...but give that a try first!

    now, theres a much more efficient way of doing this but that involves "collosion" and functions.
    That looks like collision to me. Anyways

    Collision check and if pad:cross() then
    sprite = the other sprite you want
    screen:blit(x,y,bla)
    and all the other stuff you want to happen
    end

    But if you can get collision that well go to evilmana they explain it pretty good.
    If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
    Gold donations are highly appreciated!

  22. #5002
    QJ Gamer Silver
    Points: 7.278, Level: 56
    Level completed: 64%, Points required for next Level: 72
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    Pimp'en in the US F#
    Beiträge
    1.254
    Points
    7.278
    Level
    56
    Downloads
    0
    Uploads
    0

    Standard

    ya, evilmana is great!
    The Wentire Worls in two Sectors....
    When did I get dev statz?
    Spoiler for my PSP homebrewReleases:
    Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
    (PvP Pong DL'ed well over 2403 times combined! get yours now!)
    Spoiler for Great Quotes:

    "No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.

  23. #5003
    QJ Gamer Green
    Points: 11.800, Level: 71
    Level completed: 38%, Points required for next Level: 250
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Middle Europe
    Beiträge
    1.281
    Points
    11.800
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    pls how do i make something go up together wit timer?

    i mean:

    if currentTime > 1000 then
    screen:print( 10, 10, "1%", blue)
    end
    if curretTime > 2000 then
    screen:print(10 ,10, "2%", blue)
    end

    the problem is %s are overriding and its unreadable...

  24. #5004
    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 myschoo
    pls how do i make something go up together wit timer?

    i mean:

    if currentTime > 1000 then
    screenrint( 10, 10, "1%", blue)
    end
    if curretTime > 2000 then
    screenrint(10 ,10, "2%", blue)
    end

    the problem is %s are overriding and its unreadable...
    Code:
    timer = Timer.new()
    
    while true do
    
    screen:print(10,10, math.floor(timer:time()/1000), blue)
    
    screen.waitVblankStart()
    screen:flip()
    end
    that will show the number of seconds.
    --------------------------------------------------------------------------------------

  25. #5005
    QJ Gamer Green
    Points: 11.800, Level: 71
    Level completed: 38%, Points required for next Level: 250
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Middle Europe
    Beiträge
    1.281
    Points
    11.800
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    thx dude... :)

    edit. ok another question... how do i do it to prin only seconds? not like 14.698 sec.... :/
    Geändert von myschoo (01-13-2007 um 10:20 AM Uhr)

  26. #5006
    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 myschoo
    thx dude... :)

    edit. ok another question... how do i do it to prin only seconds? not like 14.698 sec.... :/
    ?
    that does print only seconds...
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  27. #5007
    QJ Gamer Green
    Points: 11.800, Level: 71
    Level completed: 38%, Points required for next Level: 250
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Middle Europe
    Beiträge
    1.281
    Points
    11.800
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    yeh but somehow it always gave me error with grims methos so i just used

    timeinSecs = timer:time() / 1000
    print:screen(x,x, timeinSecs .. "seconds", blue)

    but now i see 14.658 secs

  28. #5008
    QJ Gamer Gold
    Points: 11.629, Level: 70
    Level completed: 95%, Points required for next Level: 21
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Beiträge
    1.633
    Points
    11.629
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Change timer:time() / 1000

    to

    math.floor(timer:time()/1000)

  29. #5009
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Use the math.floor function which rounds down.

  30. #5010
    QJ Gamer Green
    Points: 11.800, Level: 71
    Level completed: 38%, Points required for next Level: 250
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Middle Europe
    Beiträge
    1.281
    Points
    11.800
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    oh thx i will try this

    btw. why did u change name from penguin to pinguin? o_O

    yep, works perfect, thanks guys :)


 

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

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