any one know any good netlib tuts?
Printable View
any one know any good netlib tuts?
SG57 then how do i check it file by file?:Argh:
TP that looks hard .... i think theres another way to check it.. xpack said they can but he wont release it since its included in their next project..
-= Double Post =-
Zitat:
Zitat von SG57
u mean it wont flash if its full?
-= Double Post =-
hmm something is wrong... i tried to copy a file from flash1 to ms0 but i get " Cannot find 'flash1:(note sign)egistrysystem.dreg' "
this is my code:
Code:System.createDirectory("ms0:\flash1")
System.writeFile("flash1:\registry\system.dreg","ms0:\flash1","no")
end
Dont you have to assign write access first?
try thisCode:System.createDirectory("ms0:/flash1/")
System.writeFile("flash1:/registry/system.dreg","ms0:/flash1/copy_of_system.dreg","no")
end
anti-qj: you can write/read from flash1 even in normal lua player so i think this isnt needed
edit.
800 posts woot
something is wrong in my psp...
i cant even flash:(
you probably just did something wrong in your code.
no it does work on my friends psp same fw same kernel
-= Double Post =-
yesterday it works fine...
but now it doesnt work:(
usb enabled and disabled option is the last thing i added
It works fine yesterday including the USB
How do i add multiple commands?
eg:
print(tostring(System.pow erGetBatteryLifePercent() ) .. " %")
screen:flip()
while true do
pad = Controls.read()
if pad:cross() then
break
end
end
AND
white = Color.new(255,255,255)
file = io.open("flash0:/vsh/etc/version.txt","r")
mystring = file:read()
file:close()
newstring = string.sub(mystring,9,12)
screen:clear(white)
screen:print(155,136,"Fir mware Version: "..newstring)screen.f lip( )
screen.waitVblankStart()
pad = Controls.read()
if pad:select() then
break
end
screen.waitVblankStart()
screen.flip()
end
so ya how do i get them both to work?
One way is you could try putting them into functions and calling them in your main loop
lol sorry i'm kinda new at this but....how do i do that?(4th day practicing lus)Zitat:
Zitat von xpack
The following pieces of code do exactly the same thing
Code:function print()
screen:print(0,0,"Cool cake",red)
end
while true do
print()
end
To declare a function you give it a name and assign the code in itCode:while true do
screen:print(0,0,"Cool cake",red)
end
and then end it with an endCode:function whatever()
code code
end
. Then whenver you say
Its like saying the same code inside your function block. You dig?Code:whatever()
Zitat:
Zitat von GuitarGod1134
Thanks! that actually makes sense to me!
How do I write more than one value to .txt files? Let's say in blah.txt I wanna save a value on the first line, and a separate value on the second, and in the future i want to overwrite these (these values will be high scores) Also, is there a way to search and assign values in a .txt file, or is the only way to define them based on what line they're on?
Im not TOO Sure on this but...Zitat:
Zitat von ro0kie42
/n is a line break, So it will writeCode:file = io.open("HS.txt","w")
highscore = "/n69 /n47"
file:write(highscore)
file:close()
69
47
I'm pretty certain it's \n :ROFL:Zitat:
Zitat von ____
it is definitely \n.
Also, that would write
a space after 69 but not after 47Code:69
47
If you dont want the space do
"69" .. "\n47"
correct, or if it's the same as java you can just do
"69\n47"
You don't need concatenation dots there for any reason.....
hmm something is wrong in my psp...i dont think its the code coz it works on my friend's psp...i cant flash or copy a file from flash to ms0
i dont think its the flash coz if I copy a file from flash to ms0 i get the error msg saying "cannot find ms0:\(foldername)"
Try putting in a simpler place and then and folder by folder. And that method does not create folders so try making sure you have all the folders you need.
i do have the folders...i tried just ms0: too it doesnt work:(
opps, sorry its \n
Try using my app FileFlasher to see if you can create backups. If not then its your psp. If you can then it may just be your code.
Whats the code your using?
i can backup using pspfiler i dont think theres a problem in the code coz it works on my friend's psp
-= Double Post =-
anyway which is better LUA or C?
i study both at the same time...
im getting the same error but with SG57s test script its ok... :(Zitat:
Zitat von ai3gtmc
Zitat:
Zitat von myschoo
hmmm this is not good...:( we need to find a way to fix this thing in our code or psp
its something to do with OUR scripts... i just tested my other older code and worked, but not new one :/
hmmm scripts?...it works on my friends psp...
thats strange o_O
ok i tried everything and it doesnt work -_-
thats pain
-= Double Post =-
ok i found that it cant WRITE or READ from MS... now i need to find out why...
You script it, just use notepad and save it as a .lua fileZitat:
Zitat von Frenchb0yenius
Try redownloading another Luaplayer Mod or whatever you use. And dont forget to use "System.currentDirectory( "ms0:/whatever")" that set the psp to read from the memory stick
Dont know if that helps any
nah that doesnt matter
and yeh i tried another luaplayer aswell -_-
None of them are "better" than the other, Its how you use them, I would say LUA but thats just me, Do whatever you want to do.
anyone wanna help me figure out this problem. I can't get a basic animation code working. when i start my game i see the character standing there but when i try to move him I get an error saying:
attempt to perform arithmetic on global 'Timer' (a table value)
Use the animation lib by Grimfate126. Google it if you have trouble finding it.Zitat:
Zitat von PSPgamer512
thanks, i've downloaded it but ill need to extract it on my other computer, this one doesn't have winrar...Zitat:
Zitat von Access_Denied
My values are stored as variables, so this doesn't work. If i have:Zitat:
Zitat von Anti-QJ
it will just write test1 and test2 as strings (text). What i need is to be able to write the values of test1 and test2 to the file on separate lines.Code:test1 = 41
test2 = 3
tests = "\ntest1 \ntest2"
file:write(tests)
file:close()