PSP Hacks - Forums

Go Back   PSP Hacks - Forums > Tech Talk > LUA Scripting

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 05-12-2007, 12:05 AM
zrx-power zrx-power is offline
PSP Newbie
 

Join Date: Apr 2007
Posts: 30
zrx-power Has a Beginner Reputation
Default

I had write these codes
Quote:
if ((io.open("ms0:/backups/saves/mod/topmenu_plugin.rco","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/topmenu_plugin.rco","flash0:/vsh/resource/topmenu_plugin.rco","no")
end

if ((io.open("ms0:/backups/saves/mod/system_plugin.rco","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/system_plugin.rco","flash0:/vsh/resource/system_plugin.rco","no")
end

if ((io.open("ms0:/backups/saves/mod/01-12.bmp","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/01-12.bmp","flash0:/vsh/resource/01-12.bmp","no")
end

if ((io.open("ms0:/backups/saves/mod/impose_plugin.rco","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/impose_plugin.rco","flash0:/vsh/resource/impose_plugin.rco","no")
end

if ((io.open("ms0:/backups/saves/mod/system_plugin_fg.rco","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/system_plugin_fg.rco","flash0:/vsh/resource/system_plugin_fg.rco","no")
end

if ((io.open("ms0:/backups/saves/mod/system_plugin_bg.rco","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/system_plugin_bg.rco","flash0:/vsh/resource/system_plugin_bg.rco","no")
end

if ((io.open("ms0:/backups/saves/mod/ltn0.pgf","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/ltn0.pgf","flash0:/font/ltn0.pgf","no")
end

if ((io.open("ms0:/backups/saves/mod/opening_plugin.rco","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/opening_plugin.rco","flash0:/vsh/resource/opening_plugin.rco","no")
end

if ((io.open("ms0:/backups/saves/mod/gameboot.pmf","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/gameboot.pmf","flash0:/vsh/resource/gameboot.pmf","no")
end

if ((io.open("ms0:/backups/saves/mod/savedata_plugin.rco","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/savedata_plugin.rco","flash0:/vsh/resource/savedata_plugin.rco","no")
end

if ((io.open("ms0:/backups/saves/mod/game_plugin.rco","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/game_plugin.rco","flash0:/vsh/resource/game_plugin.rco","no")
end
But when i run it ~it gives me
Quote:
error:cannot find 'ms0:/backups/saves/mod/savedata_plugin.rco'
Error:No cript file found
but the savedata_plugin.rco is in the floder!
when i remove the savedata_plugin.rco it gives me
Quote:
error:cannot find 'ms0:/backups/saves/mod/game_plugin.rco'
Error:No cript file found
but the game_plugin.rco is in the floder!

when i remove these two file from the floder,it won't run into error!!
i think the problem might be in the file open&close

so i chang these codes into
Quote:
if ((io.open("ms0:/backups/saves/mod/topmenu_plugin.rco","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/topmenu_plugin.rco","flash0:/vsh/resource/topmenu_plugin.rco","no")
io.open("ms0:/backups/saves/mod/topmenu_plugin.rco","r"):close()
end

if ((io.open("ms0:/backups/saves/mod/system_plugin.rco","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/system_plugin.rco","flash0:/vsh/resource/system_plugin.rco","no")
io.open("ms0:/backups/saves/mod/system_plugin.rco","r"):close()
end

if ((io.open("ms0:/backups/saves/mod/01-12.bmp","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/01-12.bmp","flash0:/vsh/resource/01-12.bmp","no")
io.open("ms0:/backups/saves/mod/01-12.bmp","r"):close()
end

if ((io.open("ms0:/backups/saves/mod/impose_plugin.rco","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/impose_plugin.rco","flash0:/vsh/resource/impose_plugin.rco","no")
io.open("ms0:/backups/saves/mod/impose_plugin.rco","r"):close()
end

if ((io.open("ms0:/backups/saves/mod/system_plugin_fg.rco","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/system_plugin_fg.rco","flash0:/vsh/resource/system_plugin_fg.rco","no")
io.open("ms0:/backups/saves/mod/system_plugin_fg.rco","r"):close()
end

if ((io.open("ms0:/backups/saves/mod/system_plugin_bg.rco","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/system_plugin_bg.rco","flash0:/vsh/resource/system_plugin_bg.rco","no")
io.open("ms0:/backups/saves/mod/system_plugin_bg.rco","r"):close()
end

if ((io.open("ms0:/backups/saves/mod/ltn0.pgf","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/ltn0.pgf","flash0:/font/ltn0.pgf","no")
io.open("ms0:/backups/saves/mod/ltn0.pgf","r"):close()
end

if ((io.open("ms0:/backups/saves/mod/opening_plugin.rco","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/opening_plugin.rco","flash0:/vsh/resource/opening_plugin.rco","no")
io.open("ms0:/backups/saves/mod/opening_plugin.rco","r"):close()
end

if ((io.open("ms0:/backups/saves/mod/gameboot.pmf","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/gameboot.pmf","flash0:/vsh/resource/gameboot.pmf","no")
io.open("ms0:/backups/saves/mod/gameboot.pmf","r"):close()
end

if ((io.open("ms0:/backups/saves/mod/savedata_plugin.rco","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/savedata_plugin.rco","flash0:/vsh/resource/savedata_plugin.rco","no")
io.open("ms0:/backups/saves/mod/savedata_plugin.rco","r"):close()
end

if ((io.open("ms0:/backups/saves/mod/game_plugin.rco","r"))==NULL) then
a=a+1
else
System.writeFile("ms0:/backups/saves/mod/game_plugin.rco","flash0:/vsh/resource/game_plugin.rco","no")
io.open("ms0:/backups/saves/mod/game_plugin.rco","r"):close()
end
But it runs into the same error as before!

Can some one give me a help??
Writting this makes me tried~~
Reply With Quote
  #2  
Old 05-14-2007, 11:32 PM
Zora 182 Zora 182 is offline
PSP Enthusiast
 

Join Date: Jun 2006
Location: Hyrule Rank:Hero
Posts: 429
Zora 182 Has a Beginner Reputation
Default

I'm not too good in lua, but if you need help on this and fast, go over to evilmana.com, they helped me with some of my scripts
Reply With Quote
  #3  
Old 05-15-2007, 02:50 PM
pirata nervo pirata nervo is offline
Programmer
PSP Titan
 

Join Date: Mar 2007
Location: www.consoleworld.net
Posts: 5,651
pirata nervo is on a distinguished road
Default

When you run it with your psp?:
verify if that .rco files are decrypted.
__________________
Reply With Quote
  #4  
Old 05-22-2007, 02:37 AM
zrx-power zrx-power is offline
PSP Newbie
 

Join Date: Apr 2007
Posts: 30
zrx-power Has a Beginner Reputation
Default

Quote:
Originally Posted by pirata nervo
When you run it with your psp?:
verify if that .rco files are decrypted.
Yes all the rco files is good~and decrypted~
but the problem is still out
Reply With Quote
Reply

 



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:29 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
©