1. BENVENUTO SU CONSOLE TRIBE

    Benvenuto, stai navigando nella nostra community come ospite

    Avere un account su Console Tribe ti permetterà di creare e partecipare alle discussioni e al mercatino, organizzare tornei e partite online, iniziare conversazioni personali con gli altri giocatori del forum e di utilizzare tutte le funzioni di questo sito.

    Registra il tuo account in meno di 5 secondi, se vuoi puoi sfruttare i login social via Facebook, Google Plus o Twitter.

[HELP] XMB Modder un HB creato dal mio amico

Discussion in 'PSP General Chat' started by andrea1234567890, Sep 4, 2009.

  1. andrea1234567890

    andrea1234567890 Tribe Member

    Joined:
    Sep 7, 2007
    Messages:
    450
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    PS3LANDIA XD
    Nlela riga 34 gli dà un errore che cosa può essere, chi è bravo me lo può correggere :)? ecco il codice:

    Code:
    ------------
    -- colors --
    ------------
    
    blu = Color.new(240, 240, 255,255)
    rosso = Color.new(255, 0, 0,255)
    bluchiaro = Color.new(200, 255, 255,255)
    nero = Color.new(0, 0, 0,255)
    rossoscuro = Color.new(160,0,0,255)
    bianco = Color.new(255,255,255,255)
    
    
    System.memclean()
    
    
    ----------------------
    -- Load images -------
    ----------------------
    
    
    up_image = Image.load("DATA/Images/Sopra.png")
    down_image = Image.load("DATA/Images/Sotto.png")
    selector_image = Image.load("DATA/Images/Selettore.png")
    border_image = Image.load("DATA/Images/Bordo.png")
    popup_image = Image.load("DATA/Images/Popup.png")
    
    
    --Enable writing to flash0
    System.unassign("flash0:")
    System.assign( "flash0:", "lflash0:0,0", "flashfat0:")
    
    dirs=System.listDirectory("ms0:/RCOS/waves/")
    print(table.getn(10,2,4)
    i=5
    
    image_loaded = "False"
    
    
    
    ---------------------------
    --- FUNCTIONS -------------
    ---------------------------
    
    
    function load_image()
        if image_loaded == "False" then
        file = io.open("ms0:/RCOS/waves/"..dirs[i].name.."/Preview.png")
            if file then
         
               file:close() 
    back_image = Image.load("ms0:/RCOS/waves/" .. dirs[i].name .. "/Preview.png")
    else    
    back_image = Image.load("ms0:/PSP/GAME/XMB_RCO_Patcher/DATA/Images/nnt.png")
    end
    end
    image_loaded = "True"
    end
    
    
    -------------------------------
    ---Main Loop ------------------
    -------------------------------
    
    
    
    while true do
    screen.startDraw()
    screen.clear(0)
    load_image()
    Image.blit(0, 0, back_image)
    Image.blit(0, 0, selector_image)
    Image.blit(0, 252, border_image)
    
    screen.print(15,22,"Wave " .. "[" .. i - 2 .. "/" .. nd - 2 .. "]" .. " : " .. dirs[i].name, 0.6, black,1)
    screen.print(5,265, "L+R: VEDI COMANDI", 0.6,red,1)
    screen.endDraw()
    
    
    
    if i > 3 then 
     screen.startDraw()
       Image.blit(80, 5, up_image)
    screen.endDraw()
    end
    
    if nd > 3 then 
        if i < nd then 
      screen.startDraw()  
        Image.blit(80, 25, down_image)
     screen.endDraw()  
     end
    end
    
    
    pad = Controls.read()
    
    if pad:down() then 
        i = i + 1
        if i > nd then 
        i = nd
        end
    image_loaded = "False"
    screen.waitVblankStart(10)
    end
    
    if pad:up() then
        i = i - 1
        if i < 3 then 
        i = 3
        end
    
    
    image_loaded = "False"
    screen.waitVblankStart(10)
    end
    
    
    
    
    ------------------------------------------
    --------- APPLY WAVE   ------
    ------------------------------------------
    if pad:l() and pad:start() then
    System.message("APPLICA:  "..dirs[i].name.."  LA NUOVA ONDA ?",1)
    
    butpress = System.buttonPressed()
    
            
    
                 if butpress == 1 then
    
        
           file = io.open("ms0:/RCOS/waves/"..dirs[i].name.."/system_plugin_bg.rco") 
    
    if not file then 
    
    System.message("* NOTIZIA *\n\nNo Onda nella flash",0)
    System.Quit()
    else
    System.removeFile("ms0:/RCOS/system_plugin_bg.rco")
    System.copyFile("ms0:/RCOS/waves/"..dirs[i].name.."/system_plugin_bg.rco","ms0:/RCOS/system_plugin_bg.rco",0)  
    System.message("Onda Caricata.\n\per visualizzare le onde sul tuo sfondo devi  impostare il tema classico in TEMA dal menu Impostazioni della XMB.\n\nAttenda un attimo...",0)
    dofile("DATA/lua/menu.lua")          
     end
            
            if butpress ~= 1 then
        
            
                     end
                     end
    
                      end
                       
    
    ------------------------------------
    -- Rename ---
    ------------------------------------
    if pad:l() and pad:circle() then
    System.message("Rinomina:  "..dirs[i].name.."  ONDA ?",1)
    
    butpress = System.buttonPressed()
    
            
    
                 if butpress == 1 then
        
            file = io.open("ms0:/RCOS/waves/".. dirs[i].name)
            outputtxt = System.startOSK("Onde","Nuovo Nome")
            System.rename("ms0:/RCOS/waves/"..dirs[i].name,outputtxt) 
            System.message("Onda Rinominata",0)    
            dofile("DATA/lua/wave.lua")
            end
                
    
            if butpress ~= 1 then
        
            
                     end
                      end
    
    ------------------------------------
    -- SHOW CONTROLS ---
    ------------------------------------
    if pad:l() and pad:r() then
    System.message("* L + R = VEDO COMANDI\n* L + START = APPLICA ONDA\n* L + SELECT = VAI ALLA XMB\n* L + TRIANGLE = MENU' PRINCIPALE\n* L + CIRCLE = RINOMINA ONDA",0)
    end
    
    
    
    ---------------------------------------
    --- return to main menu----
    -----------------------------------------
    
    if pad:l() and pad:triangle() then
    dofile("DATA/lua/MENU.lua")
    end
    
    screen.flipscreen()
    screen.waitVblankStart()
    oldpad = pad
    end
    
  2. Notonlyeyes

    Notonlyeyes Tribe Newbie

    Joined:
    Dec 28, 2008
    Messages:
    729
    Likes Received:
    0
    Trophy Points:
    0
    Ciao andrea1234567890...forse manca una parentesi ) alla fine print(table.getn(10,2,4)) invece di print(table.getn(10,2,4) ....ma potrei sbagliare....Un saluto da Notonlyeyes
  3. andrea1234567890

    andrea1234567890 Tribe Member

    Joined:
    Sep 7, 2007
    Messages:
    450
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    PS3LANDIA XD
    si ci ho provato ma mi dà lo steso erorre, infatti gliel'avevo detto io ci ho provato ma niente
  4. Notonlyeyes

    Notonlyeyes Tribe Newbie

    Joined:
    Dec 28, 2008
    Messages:
    729
    Likes Received:
    0
    Trophy Points:
    0
    Avete provato print(table.getn{10,2,4}) ?...by Notonlyeyes
  5. andrea1234567890

    andrea1234567890 Tribe Member

    Joined:
    Sep 7, 2007
    Messages:
    450
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    PS3LANDIA XD
    mmm poi testo am non epnso che poi sia così vabbè proverò dopo
  6. Pandora'

    Pandora' Tribe Newbie

    Joined:
    Jul 17, 2009
    Messages:
    332
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    In Your Hands (XD)
    prova a mettere così:
    nd=table.getn(dirs)
    i = 3