Seite 278 von 342 ErsteErste ... 178 228 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 328 ... LetzteLetzte
Zeige Ergebnis 8.311 bis 8.340 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; I had the same problem but managed to find a work around,...

  
  1. #8311
    QJ Gamer Bronze
    Points: 3.754, Level: 38
    Level completed: 70%, Points required for next Level: 46
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    103
    Points
    3.754
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    I had the same problem but managed to find a work around,



  2. #8312
    Ænima
    Points: 6.447, Level: 52
    Level completed: 49%, Points required for next Level: 103
    Overall activity: 0%

    Registriert seit
    Sep 2007
    Beiträge
    587
    Points
    6.447
    Level
    52
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von FreePlay
    err... except that sometimes, it does. sometimes it acts like the files aren't even there.
    Really? I've been told over and over again that it's a simple attribute that the PSP doesn't even recognize.

    Well, in that case, go into Windows, and uncheck the hidden attribute. Then compare the hidden and shown file to find how to remove the attribute. (Then again, that would probably be easier in C.)
    [IMG]http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Zoso.svg/744px-Zoso.svg.png[/IMG]

    Looking for some good C programming tutorials for the PSP? Look no further! [URL="http://psp-coding.com/"]PSP-Coding.com[/URL] is your source for all your PSP coding needs.

  3. #8313
    QJ Gamer Bronze
    Points: 3.754, Level: 38
    Level completed: 70%, Points required for next Level: 46
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    103
    Points
    3.754
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    I thought that the folder attribute was not the problem and that it was the read only file attribute of some files that caused the problem,

  4. #8314
    QJ Gamer Silver
    Points: 6.948, Level: 54
    Level completed: 99%, Points required for next Level: 2
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Beiträge
    657
    Points
    6.948
    Level
    54
    Downloads
    5
    Uploads
    0

    Standard

    Last night, I removed the "read only" and "hidden system file" attributes (from the .prx files in flash0:/vsh/module") with PSPFiler, and my script still will not recognize them...

    Any ideas??
    PSP: PSP SLIM 2001 TA-088v2
    Custom Firmware: 5.00 M33-6

  5. #8315
    QJ Gamer Bronze
    Points: 3.754, Level: 38
    Level completed: 70%, Points required for next Level: 46
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    103
    Points
    3.754
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Mr_Shizzy
    Last night, I removed the "read only" and "hidden system file" attributes (from the .prx files in flash0:/vsh/module") with PSPFiler, and my script still will not recognize them...

    Any ideas??
    This is not a safe way to do it but...

    Before over writing the file in flash0 I check there is a replacement to be flashed,

    If it exists I delete the file in flash0 then write my replacement,

    This was the only way I could get around the problem and I did not look into changing file attributes,

    Also I don't do lua and I did this using C,

  6. #8316
    QJ Gamer Silver
    Points: 6.948, Level: 54
    Level completed: 99%, Points required for next Level: 2
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Beiträge
    657
    Points
    6.948
    Level
    54
    Downloads
    5
    Uploads
    0

    Standard

    I'll look into this hibby.
    I'm not sure if LuaPlayer will even be able to find it to delete it.

    I'm currently learning the C basics. (Trying to get away from this lua stuff)
    But in the meantime, I wanted to throw a quick theme switcher for 3.80 M33.

    (I change themes a lot) :P
    PSP: PSP SLIM 2001 TA-088v2
    Custom Firmware: 5.00 M33-6

  7. #8317
    QJ Gamer Bronze
    Points: 3.754, Level: 38
    Level completed: 70%, Points required for next Level: 46
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    103
    Points
    3.754
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    Does lua have any dirent functions?

    You could try printing the contents of the module folder or do a file exists check to see if lua can see them,

    I had several problems getting a file to flash using C,

    I have found that 0x800 works well for this but not sure how lua sorts out it's module mode,

  8. #8318
    QJ Gamer Silver
    Points: 6.948, Level: 54
    Level completed: 99%, Points required for next Level: 2
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Beiträge
    657
    Points
    6.948
    Level
    54
    Downloads
    5
    Uploads
    0

    Standard

    ^^^ I'll try that.

    I just tried removing paf.prx from module folder (no worries- I got a DC4)
    It says it done it successful, but it doesn't actually remove it...

    EDIT:
    Is there any src to a basic (C) 3XX flasher kicking around ?
    Maybe I could study that, and just forget doing it in Lua...

    A 1.5 flasher in C is cake, but this .prx building (for 3xx kernel functions) is a little confusing to me (I'm still a C newb )
    PSP: PSP SLIM 2001 TA-088v2
    Custom Firmware: 5.00 M33-6

  9. #8319
    QJ Gamer Bronze
    Points: 3.754, Level: 38
    Level completed: 70%, Points required for next Level: 46
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    103
    Points
    3.754
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    What module mode does the lua player use?

    It sounds like the module mode is not correct,

    I had the same thing happen when using the wrong module mode,

    It would say it was successful but never really did anything to the file,

  10. #8320
    QJ Gamer Silver
    Points: 6.948, Level: 54
    Level completed: 99%, Points required for next Level: 2
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Beiträge
    657
    Points
    6.948
    Level
    54
    Downloads
    5
    Uploads
    0

    Standard

    Not sure, but I can upload the src.
    Hold on...

    src:
    http://rapidshare.com/files/86354874...yer_20_src.rar

    makefile:
    http://www.mediafire.com/?ems20mmn1ly
    PSP: PSP SLIM 2001 TA-088v2
    Custom Firmware: 5.00 M33-6

  11. #8321
    QJ Gamer Bronze
    Points: 3.754, Level: 38
    Level completed: 70%, Points required for next Level: 46
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    103
    Points
    3.754
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    Well it says...

    PSP_MODULE_INFO("LUAPLAYE R", 0x1000, 1, 1)

    So that's in kernel mode,

    I had problems flashing some files using this mode but Pirata Nervo said he managed to flash files using it,

  12. #8322
    QJ Gamer Silver
    Points: 6.948, Level: 54
    Level completed: 99%, Points required for next Level: 2
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Beiträge
    657
    Points
    6.948
    Level
    54
    Downloads
    5
    Uploads
    0

    Standard

    Yes, I was having trouble compiling it, so Pirata Nervo kindly edited the makefile for me...

    although the damn thing still wont compile for me, as it keeps giving me errors in cygwin...

    Spoiler for cygwin error:


    So no, the lua player mod I'm actually using now, is running in 1.5 kernel...


    EDIT: I just noticed looking over the error, that it looks as if I was trying to recompile [email protected]'s lua recompile source ??
    I'll try to recompile it with the .16 version of lua player...



    EDIT #2 I think my cygwin is not set up correctly...
    I used [email protected]'s "newb proof" set up... Damn...
    Geändert von Mr_Shizzy (01-26-2008 um 06:42 AM Uhr)
    PSP: PSP SLIM 2001 TA-088v2
    Custom Firmware: 5.00 M33-6

  13. #8323
    QJ Gamer Bronze
    Points: 3.754, Level: 38
    Level completed: 70%, Points required for next Level: 46
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    103
    Points
    3.754
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    cygwin is a pain in the arse sometimes,


    As for the error in sound.cpp it has...

    #include "mikmod.h"

    but I can not find it in the source that you uploaded after searching for the file,

  14. #8324
    Developer and Tutor.
    Points: 8.736, Level: 62
    Level completed: 96%, Points required for next Level: 14
    Overall activity: 0%

    Registriert seit
    Jul 2007
    Ort
    Widnes, England
    Beiträge
    1.649
    Points
    8.736
    Level
    62
    My Mood
    Happy
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von hibbyware
    cygwin is a pain in the arse sometimes,


    As for the error in sound.cpp it has...

    #include "mikmod.h"

    but I can not find it in the source that you uploaded after searching for the file,
    change it to <mikmod.h>
    ------ FaT3oYCG -----
    AKA Craig, call me what you want to It's your preference.
    My Website: http://www.modern-gamer.co.uk/

    Currently working on:
    (0) MediaGrab
    (0) PGE Gears Of War - On hold (Very large project).
    (0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).

  15. #8325
    QJ Gamer Silver
    Points: 6.948, Level: 54
    Level completed: 99%, Points required for next Level: 2
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Beiträge
    657
    Points
    6.948
    Level
    54
    Downloads
    5
    Uploads
    0

    Standard

    ^^^ OK, thanks guys.
    [email protected] - I changed that, but now ended up with this error:

    Spoiler for New Error:
    PSP: PSP SLIM 2001 TA-088v2
    Custom Firmware: 5.00 M33-6

  16. #8326
    QJ Gamer Bronze
    Points: 3.754, Level: 38
    Level completed: 70%, Points required for next Level: 46
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    103
    Points
    3.754
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    #include "mikmod.h" appears in more then one file so it may be worth changing it in all the files,

    Like sound.h etc

  17. #8327
    QJ Gamer Silver
    Points: 6.948, Level: 54
    Level completed: 99%, Points required for next Level: 2
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Beiträge
    657
    Points
    6.948
    Level
    54
    Downloads
    5
    Uploads
    0

    Standard

    ^^^ Did that... Still no luck.

    This is frustrating...
    PSP: PSP SLIM 2001 TA-088v2
    Custom Firmware: 5.00 M33-6

  18. #8328
    QJ Gamer Bronze
    Points: 3.754, Level: 38
    Level completed: 70%, Points required for next Level: 46
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    103
    Points
    3.754
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    Yeah I'm sure somebody here could figure it out,

    I just don't understand why it says #include "mikmod.h" in all the file if mikmod.h does not get supplied with the lua player,

  19. #8329
    Developer and Tutor.
    Points: 8.736, Level: 62
    Level completed: 96%, Points required for next Level: 14
    Overall activity: 0%

    Registriert seit
    Jul 2007
    Ort
    Widnes, England
    Beiträge
    1.649
    Points
    8.736
    Level
    62
    My Mood
    Happy
    Downloads
    0
    Uploads
    0

    Standard

    here is my luaplayer 0.20 i can compile that fine

    LuaPlayer0.20.rar

    if you want me to compile a special version for you send me the src or tell me what you want changing ans ill see what i can do for you

    also if you wanted to make it easier add me on msn hotmail / windows live messenger at [email protected]

    thanks

    it also sounds like you havent installed lib mik mod or mik mod lib

    go to cygwin and copy and paste this in

    Zitat Zitat von lib auto installer

    svn checkout svn://svn.ps2dev.org/psp/trunk/zlib
    cd zlib
    make
    make install
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/bzip2
    cd bzip2
    make
    make install
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/freetype
    cd freetype
    sh autogen.sh
    LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lc -lpspuser" ./configure --host psp --prefix=$(psp-config --psp-prefix)
    make
    make install
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/jpeg
    cd jpeg
    make
    make install
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/libbulletml
    cd libbulletml
    cd src
    make
    make install
    cd ..
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/libmad
    cd libmad
    make
    cp -Rf ./include /usr/local/pspdev/psp/
    cp -Rf ./lib/libmad.a /usr/local/pspdev/psp/lib
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/libmikmod
    cd libmikmod
    make -f Makefile.psp
    make -f Makefile.psp install
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/libogg
    cd libogg
    LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lc -lpspuser" ./autogen.sh --host psp --prefix=$(psp-config --psp-prefix)
    make
    make install
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/libpng
    cd libpng
    make
    make install
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/libpspvram
    cd libpspvram
    make
    make install
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/libTremor
    cd libTremor
    LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lc -lpspuser" ./autogen.sh --host psp --prefix=$(psp-config --psp-prefix)
    make
    make install
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/libvorbis
    cd libvorbis
    LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lc -lpspuser" ./autogen.sh --host psp --prefix=$(psp-config --psp-prefix)
    make
    make install
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/lua
    cd lua
    make -f Makefile.psp
    make -f Makefile.psp install
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/pspgl
    cd pspgl
    make
    make install
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/sqlite
    cd sqlite
    LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lc -lpspuser" ./configure --host=psp --disable-readline --disable-tcl --prefix=$(psp-config --psp-prefix)
    make
    make install
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/SDL
    cd SDL
    sh autogen.sh
    LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lc -lpspuser" ./configure --host psp --prefix=$(psp-config --psp-prefix) --enable-pspirkeyb
    make
    make install
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/SDL_gfx
    cd SDL_gfx
    sh autogen.sh
    AR=psp-ar LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lc -lpspuser" ./configure --host psp --with-sdl-prefix=$(psp-config --psp-prefix) --prefix=$(psp-config --psp-prefix) --disable-mmx --disable-shared
    make
    make install
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/SDL_image
    cd SDL_image
    sh autogen.sh
    LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lpspirkeyb -lc -lpspuser" ./configure --host psp --with-sdl-prefix=$(psp-config --psp-prefix) --prefix=$(psp-config --psp-prefix)
    make
    make install
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/SDL_mixer
    cd SDL_mixer
    sh autogen.sh
    LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lc -lpspuser" ./configure --host psp --with-sdl-prefix=$(psp-config --psp-prefix) --prefix=$(psp-config --psp-prefix) --enable-music-mod
    make
    make install
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/SDL_ttf
    cd SDL_ttf
    sh autogen.sh
    LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lpspirkeyb -lc -lpspuser" ./configure --host psp --with-sdl-prefix=$(psp-config --psp-prefix) --with-freetype-prefix=$(psp-config --psp-prefix) --without-x --prefix=$(psp-config --psp-prefix)
    make
    make install
    cd ..
    svn checkout svn://svn.ps2dev.org/psp/trunk/mikmodlib
    cd mikmodlib
    make install
    cd ..
    then it may work

    - a word of warning it may take a while
    ------ FaT3oYCG -----
    AKA Craig, call me what you want to It's your preference.
    My Website: http://www.modern-gamer.co.uk/

    Currently working on:
    (0) MediaGrab
    (0) PGE Gears Of War - On hold (Very large project).
    (0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).

  20. #8330
    QJ Gamer Silver
    Points: 6.948, Level: 54
    Level completed: 99%, Points required for next Level: 2
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Beiträge
    657
    Points
    6.948
    Level
    54
    Downloads
    5
    Uploads
    0

    Standard

    Thanks hibby & [email protected] :)

    [email protected] - I'll add you to msn :)
    PSP: PSP SLIM 2001 TA-088v2
    Custom Firmware: 5.00 M33-6

  21. #8331
    Banned from QJ for LIFE
    Points: 10.957, Level: 69
    Level completed: 27%, Points required for next Level: 293
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    1.557
    Points
    10.957
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    heya all, the other week some guy released a quiz thing. i decide to add a new quiz to it earlier and so edited the lua files and added one . but when i click cross on it on the psp it isn't loading it. can you look at the code please and see why. looks fine to me. i've added the ni(nintendo) section and heres a zip on rapidshare instead of posting the files.

    http://rapidshare.com/files/86893719...eQuiz.rar.html

  22. #8332
    Banned from QJ for LIFE
    Points: 10.957, Level: 69
    Level completed: 27%, Points required for next Level: 293
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    1.557
    Points
    10.957
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    the edited file was mainly kat.lua and the ni folder. help plz anyone?

  23. #8333
    Developer and Tutor.
    Points: 8.736, Level: 62
    Level completed: 96%, Points required for next Level: 14
    Overall activity: 0%

    Registriert seit
    Jul 2007
    Ort
    Widnes, England
    Beiträge
    1.649
    Points
    8.736
    Level
    62
    My Mood
    Happy
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von mraellis
    the edited file was mainly kat.lua and the ni folder. help plz anyone?
    post the code that you edited and we will help you copy and paste it into [/code] [code] tags

    put the first one [/code-] at the end of the code
    put the second one [code] at the beginning of your code

    Code:
    your code goes here
    ------ FaT3oYCG -----
    AKA Craig, call me what you want to It's your preference.
    My Website: http://www.modern-gamer.co.uk/

    Currently working on:
    (0) MediaGrab
    (0) PGE Gears Of War - On hold (Very large project).
    (0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).

  24. #8334
    Banned from QJ for LIFE
    Points: 10.957, Level: 69
    Level completed: 27%, Points required for next Level: 293
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    1.557
    Points
    10.957
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    ok, i'm not certain what it was before though but heres the code now.

    kat.lua =

    Code:
      unloadbuff()
    System.powerGetBatteryLifePercent()
    
    red = Color.new(255, 0, 0)
    white = Color.new(255, 255, 255)
    ------------------------------------------------
    Select=1
    maxSelect=4
    menuBackground = Image.load("img/bg1.png")
    ico = Image.load("img/buton.png")
    ico1 = Image.load("img/buton1.png")
    ico2 = Image.load("img/buton2.png")
    oldpad=Controls.read()
    ------------------------------------------------
    while true do
    pad=Controls.read()
    screen:clear()
    screen:blit(0,0,menuBackground)
    ------------------------------------------------
    -----------------------------icons--------------
    
    if pad:left() and oldpad:left() ~= pad:left() then
    Select = Select - 1
    end
    if pad:right() and oldpad:right() ~= pad:right() then
    Select = Select + 1
    end
    if Select > maxSelect then
    Select = 1
    elseif Select <= 0 then
    Select = maxSelect
    end
    if Select == 1 then
    screen:blit(100,75,ico)
    screen:blit(200,80,ico1)
    screen:blit(300,80,ico2)
    end
    if Select == 2 then
    screen:blit(100,80,ico)
    screen:blit(200,75,ico1)
    screen:blit(300,80,ico2)
    end
    if Select == 3 then
    screen:blit(100,80,ico)
    screen:blit(200,80,ico1)
    screen:blit(300,75,ico2)
    end
    
    if pad:cross() and Select == 1 then
    dofile("ms/1.lua")
    end
    if pad:cross() and Select == 2 then
    dofile("qs/1.lua")
    end
    if pad:cross() and select == 3 then
    dofile("ni/1.lua")
    end
    
    screen:print(30,30,"Select a Category")
    screen:print(50,50,"Every Category has 10 Questions")
    screen.waitVblankStart()
    screen.flip()
    oldpad = pad
    end
    and heres the i.lua its meant to load.

    Code:
     unloadbuff()
    
    menuBackground=Image.load("fl.png")
    screen:blit(0,0,menuBackground)
    oldpad=Controls.read()
    screen:print(30,30,"What Does Ds mean?")
    screen:print(80,130,"Dualshock")
    screen:print(300,130,"Duel screen")
    screen:print(200,220,"Dual screens")
    screen.flip() 
    while true do
    ---------------------------
    if pad:square() then
    dofile("ni/wrong.lua")
    end
    if pad:circle() then
    dofile("ni/wrong.lua")
    end
    if pad:triangle() then
    dofile("ni/right.lua")
    end
    ---------------------------
    pad=Controls.read()
    screen.waitVblankStart()
    oldpad = pad
    end
    basically it loads without errors and has the new section (Nintendo one) has a option but when i click x on it it doesn't do anything.

    p.s i know about code tags but i uploaded it to show people as it'd be easyier since i'd added a a whole folder of like 15 lua files to, but i'll just assume they work atm since its not eve getting to them.

  25. #8335
    Developer and Tutor.
    Points: 8.736, Level: 62
    Level completed: 96%, Points required for next Level: 14
    Overall activity: 0%

    Registriert seit
    Jul 2007
    Ort
    Widnes, England
    Beiträge
    1.649
    Points
    8.736
    Level
    62
    My Mood
    Happy
    Downloads
    0
    Uploads
    0

    Standard

    i dont see any errors with that ???

    apart from the fact that max select should be 3 shouldn't it ?

    Code:
    maxselect = 3 -- <-- i think that should be that
    
    if select > maxselect then
    select = 1
    end
    as you only have three items in the menu
    ------ FaT3oYCG -----
    AKA Craig, call me what you want to It's your preference.
    My Website: http://www.modern-gamer.co.uk/

    Currently working on:
    (0) MediaGrab
    (0) PGE Gears Of War - On hold (Very large project).
    (0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).

  26. #8336
    Banned from QJ for LIFE
    Points: 10.957, Level: 69
    Level completed: 27%, Points required for next Level: 293
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    1.557
    Points
    10.957
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    even has 3 it doesn't work. i tried 4 because when there was only 2 originally it said 3. i cant see a problem either but if u download from the rapidshare link and try it u'll see it will not load the Nintendo quiz.

  27. #8337
    Developer and Tutor.
    Points: 8.736, Level: 62
    Level completed: 96%, Points required for next Level: 14
    Overall activity: 0%

    Registriert seit
    Jul 2007
    Ort
    Widnes, England
    Beiträge
    1.649
    Points
    8.736
    Level
    62
    My Mood
    Happy
    Downloads
    0
    Uploads
    0

    Standard

    oh looking at the code you have told it to load 1.lua but names the file i.lua
    ------ FaT3oYCG -----
    AKA Craig, call me what you want to It's your preference.
    My Website: http://www.modern-gamer.co.uk/

    Currently working on:
    (0) MediaGrab
    (0) PGE Gears Of War - On hold (Very large project).
    (0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).

  28. #8338
    Banned from QJ for LIFE
    Points: 10.957, Level: 69
    Level completed: 27%, Points required for next Level: 293
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    1.557
    Points
    10.957
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    sorry that was a typo on my behalf, the files called 1.lua

  29. #8339
    QJ Gamer Blue
    Points: 7.014, Level: 55
    Level completed: 32%, Points required for next Level: 136
    Overall activity: 0%

    Registriert seit
    Jan 2007
    Ort
    U.S.
    Beiträge
    405
    Points
    7.014
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Can anyone tell me the syntax for finding the number of lines in a file?

    I think I have it but it's not quite working.

    Thanks.

  30. #8340
    QJ Gamer Green
    Points: 3.721, Level: 38
    Level completed: 48%, Points required for next Level: 79
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Beiträge
    612
    Points
    3.721
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    Code:
    file = io.open("myfile","r")
    numberoflinesinthefile = 0
    for line in file:lines() do
    	numberoflinesinthefile = numberoflinesinthefile+1
    end
    file:close()
    For more on the lua IO library and other methods of doing it, check here: http://lua-users.org/wiki/IoLibraryTutorial


 

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 07:54 AM Uhr.

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