28.12.2010, 23:43
Also Leute ich hab folgenden Fehler:
Code:
error: [string "?"]:30: bad argument #1 to "ipairs" (table expected, got nil)
srr. noch ma von vorne:
script.lua:
Code:
System.setHigh()
white = Color.new(255,255,255)
blue = Color.new(0,191,255)
black = Color.new(0,0,0)
red = Color.new(255, 0, 0)
green = Color.new(0, 255, 0)
orange = Color.new(235, 115, 0)
yellow = Color.new(255, 255, 0)
gray = Color.new(160, 160, 160)
Bild = Image.load("1.png")
function flashinit()
System.unassign("flash0:")
System.sleep(80)
System.assign("flash0:","lflash0:0,0","flashfat0:")
System.sleep(80)
screen:print(1,130," Wird installiert/gespeichert...", yellow)
screen:print(1,140,"...Bitte die PSP nicht ausschalten", yellow)
screen.flip()
end
function flashfinish()
screen:print(1,130," Assigning ...", yellow)
screen:print(1,140," Flashing ...", yellow)
screen:print(1,260,"finished", green)
end
function untermenu(farbe)
counter=0
while counter<anzahlu do
counter=counter+1
screentext=textu[counter]
if counter==modusu then
screentext=screentext.." <--"
end
screen:print(1,50+(counter*10),screentext,farbe)
end
if pad:up() and not oldpad:up() then
if modusu==1 then
modusu=anzahlu
else
modusu=modusu-1
end
end
if pad:down() and not oldpad:down() then
if modusu==anzahlu then
modusu=1
else
modusu=modusu+1
end
end
if pad:cross() and not oldpad:cross() then
funkt[modusu]()
end
oldpad = pad
screen.flip()
screen.waitVblankStart()
end
function middle(text,y,color)
screen:print(240-(string.len(text)*8/2),y,text,color)
end
function left(text,y,color)
screen:print(1,y,text,color)
end
function right(text,y,color)
screen:print(480-(string.len(text)*8),y,text,color)
end
while true do
pad = Controls.read()
if System.cfwVersion()=="5.00" and System.getModel(1)=="FAT" then
dofile("ms0:/PSP/GAME/THEME0 saver V3 Revision3/5.00FAT/script.lua")
end
if System.cfwVersion()=="5.50" and System.getModel(1)=="FAT" then
dofile("ms0:/PSP/GAME/THEME0 saver V3 Revision3/5.50FAT/script.lua")
end
if System.cfwVersion()=="5.00" and System.getModel(1)=="SLIM" then
dofile("ms0:/PSP/GAME/THEME0 saver V3 Revision3/5.00SLIM/script.lua")
end
if System.cfwVersion()=="5.50" and System.getModel(1)=="SLIM" then
dofile("ms0:/PSP/GAME/THEME0 saver V3 Revision3/5.50SLIM/script.lua")
end
screen.flip()
screen.waitVblankStart()
screen:blit(0,0,Bild,true)
end
anzahl=table.getn(text)
while true do
screen.flip()
screen:clear(white)
pad = Controls.read()
screen:print(0,0,"Theme0 saver by Notepass und m33",black)
counter=0
while counter<anzahl do
counter=counter+1
screentext=text[counter]
if counter==modus then
screentext=screentext.." <--"
end
screen:print(1,30+(counter*10),screentext,black)
end
-------------------------------------------------------------------------------------------- Modus zu Modus (hoch)
if pad:up() and not oldpad:up() then
if modus==1 then
modus=anzahl
else
modus=modus-1
end
end
----------------------------------------------------------------------------------------------- Modus zu Modus (runter)
if pad:down() and not oldpad:down() then
if modus==anzahl then
modus=1
else
modus=modus+1
end
end
---------------------------------------------------------------------------------------------------- Weitere Scripte
if pad:cross() and not oldpad:cross() then
lua[modus]()
end
oldpad = pad
screen.waitVblankStart(0)
end
und main.lua:
Code:
modus = 1
oldpad = Controls.read()
text={"Originales Sony Theme","1. gespeichertes Theme installieren","2. gespeichertes Theme installieren","3. gespeichertes Theme installieren","Theme 1 speichern","Theme 2 speichern","Theme 3 speichern","CFW-Themes anzeigen","Update-Menu","Zu erweitertem Panel wechseln","Exit"}
lua={}
lua[1]=function()
flashinit()
System.copyFile("DATA/opening_plugin.rco","flash0:/vsh/resource/opening_plugin.rco",0)
System.copyFile("DATA/vshmain.prx","flash0:/vsh/module/vshmain.prx",0)
System.copyFile("DATA/ltn0.pgf","flash0:/font/ltn0.pgf",0)
System.copyFile("DATA/gameboot.pmf","flash0:/vsh/resource/gameboot.pmf",0)
System.copyFile("DATA/1.rco","flash0:/vsh/resource/system_plugin_bg.rco",0)
System.message("Erfolgreich installiert",0)
end
lua[2]=function()
flashinit()
System.copyFile("Slot1/opening_plugin.rco","flash0:/vsh/resource/opening_plugin.rco",0)
System.copyFile("Slot1/vshmain.prx","flash0:/vsh/module/vshmain.prx",0)
System.copyFile("Slot1/ltn0.pgf","flash0:/font/ltn0.pgf",0)
System.copyFile("Slot1/gameboot.pmf","flash0:/vsh/resource/gameboot.pmf",0)
System.copyFile("Slot1/1.rco","flash0:/vsh/resource/system_plugin_bg.rco",0)
System.message("Erfolgreich installiert",0)
end
lua[3]=function()
flashinit()
System.copyFile("Slot2/opening_plugin.rco","flash0:/vsh/resource/opening_plugin.rco",0)
System.copyFile("Slot2/vshmain.prx","flash0:/vsh/module/vshmain.prx",0)
System.copyFile("Slot2/ltn0.pgf","flash0:/font/ltn0.pgf",0)
System.copyFile("Slot2/gameboot.pmf","flash0:/vsh/resource/gameboot.pmf",0)
System.copyFile("Slot2/1.rco","flash0:/vsh/resource/system_plugin_bg.rco",0)
System.message("Erfolgreich installiert",0)
end
lua[4]=function()
flashinit()
System.copyFile("Slot3/opening_plugin.rco","flash0:/vsh/resource/opening_plugin.rco",0)
System.copyFile("Slot3/vshmain.prx","flash0:/vsh/module/vshmain.prx",0)
System.copyFile("Slot3/ltn0.pgf","flash0:/font/ltn0.pgf",0)
System.copyFile("Slot3/gameboot.pmf","flash0:/vsh/resource/gameboot.pmf",0)
System.copyFile("Slot3/1.rco","flash0:/vsh/resource/system_plugin_bg.rco",0)
System.message("Erfolgreich installiert",0)
end
lua[5]=function()
flashinit()
System.copyFile("flash0:/vsh/resource/opening_plugin.rco","Slot1/opening_plugin.rco",0)
System.copyFile("flash0:/vsh/module/vshmain.prx","Slot1/vshmain.prx",0)
System.copyFile("flash0:/font/ltn0.pgf","Slot1/ltn0.pgf",0)
System.copyFile("flash0:/vsh/resource/gameboot.pmf","Slot1/gameboot.pmf",0)
System.copyFile("flash0:/vsh/resource/system_plugin_bg.rco","Slot1/1.rco",0)
System.message("Erfolgreich Gespeichert",0)
end
lua[6]=function()
flashinit()
System.copyFile("flash0:/vsh/resource/opening_plugin.rco","Slot2/opening_plugin.rco",0)
System.copyFile("flash0:/vsh/module/vshmain.prx","Slot2/vshmain.prx",0)
System.copyFile("flash0:/font/ltn0.pgf","Slot2/ltn0.pgf",0)
System.copyFile("flash0:/vsh/resource/gameboot.pmf","Slot2/gameboot.pmf",0)
System.copyFile("flash0:/vsh/resource/system_plugin_bg.rco","Slot2/1.rco",0)
System.message("Erfolgreich Gespeichert",0)
end
lua[7]=function()
flashinit()
System.copyFile("flash0:/vsh/resource/opening_plugin.rco","Slot3/opening_plugin.rco",0)
System.copyFile("flash0:/vsh/module/vshmain.prx","Slot3/vshmain.prx",0)
System.copyFile("flash0:/font/ltn0.pgf","Slot3/ltn0.pgf",0)
System.copyFile("flash0:/vsh/resource/gameboot.pmf","Slot3/gameboot.pmf",0)
System.copyFile("flash0:/vsh/resource/system_plugin_bg.rco","Slot3/1.rco",0)
System.message("Erfolgreich Gespeichert",0)
end
lua[8]=function()
dofile("CWT.lua")
end
lua[9]=function()
dofile("update-menu.lua")
end
lua[10]=function()
dofile("MAIN2.lua")
end
lua[11]=function()
System.Quit()
end
anzahl=table.getn(text)
while true do
screen.flip()
screen:clear(white)
pad = Controls.read()
screen:print(0,0,"Theme0 saver by Notepass und m33",black)
counter=0
while counter<anzahl do
counter=counter+1
screentext=text[counter]
if counter==modus then
screentext=screentext.." <--"
end
screen:print(1,30+(counter*10),screentext,black)
end
-------------------------------------------------------------------------------------------- Modus zu Modus (hoch)
if pad:up() and not oldpad:up() then
if modus==1 then
modus=anzahl
else
modus=modus-1
end
end
----------------------------------------------------------------------------------------------- Modus zu Modus (runter)
if pad:down() and not oldpad:down() then
if modus==anzahl then
modus=1
else
modus=modus+1
end
end
---------------------------------------------------------------------------------------------------- Weitere Scripte
if pad:cross() and not oldpad:cross() then
lua[modus]()
end
oldpad = pad
screen.waitVblankStart(0)
end
Ich find den fehler net kann mir einer helfen??