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,...
-
01-25-2008, 04:00 PM #8311QJ Gamer Bronze
- Registriert seit
- Mar 2007
- Beiträge
- 103
- Points
- 3.754
- Level
- 38
- Downloads
- 0
- Uploads
- 0
I had the same problem but managed to find a work around,
-
01-25-2008, 04:21 PM #8312
Really? I've been told over and over again that it's a simple attribute that the PSP doesn't even recognize.
Zitat von FreePlay
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.
-
01-25-2008, 04:33 PM #8313QJ Gamer Bronze
- Registriert seit
- Mar 2007
- Beiträge
- 103
- Points
- 3.754
- Level
- 38
- Downloads
- 0
- Uploads
- 0
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,
-
01-26-2008, 05:17 AM #8314
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-088v2Custom Firmware: 5.00 M33-6
-
01-26-2008, 05:33 AM #8315QJ Gamer Bronze
- Registriert seit
- Mar 2007
- Beiträge
- 103
- Points
- 3.754
- Level
- 38
- Downloads
- 0
- Uploads
- 0
This is not a safe way to do it but...
Zitat von Mr_Shizzy
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,
-
01-26-2008, 05:45 AM #8316
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) :PPSP: PSP SLIM 2001 TA-088v2Custom Firmware: 5.00 M33-6
-
01-26-2008, 05:56 AM #8317QJ Gamer Bronze
- Registriert seit
- Mar 2007
- Beiträge
- 103
- Points
- 3.754
- Level
- 38
- Downloads
- 0
- Uploads
- 0
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,
-
01-26-2008, 06:04 AM #8318
^^^ 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-088v2Custom Firmware: 5.00 M33-6
-
01-26-2008, 06:09 AM #8319QJ Gamer Bronze
- Registriert seit
- Mar 2007
- Beiträge
- 103
- Points
- 3.754
- Level
- 38
- Downloads
- 0
- Uploads
- 0
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,
-
01-26-2008, 06:14 AM #8320
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/?ems20mmn1lyPSP: PSP SLIM 2001 TA-088v2Custom Firmware: 5.00 M33-6
-
01-26-2008, 06:26 AM #8321QJ Gamer Bronze
- Registriert seit
- Mar 2007
- Beiträge
- 103
- Points
- 3.754
- Level
- 38
- Downloads
- 0
- Uploads
- 0
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,
-
01-26-2008, 06:30 AM #8322
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-088v2Custom Firmware: 5.00 M33-6
-
01-26-2008, 06:46 AM #8323QJ Gamer Bronze
- Registriert seit
- Mar 2007
- Beiträge
- 103
- Points
- 3.754
- Level
- 38
- Downloads
- 0
- Uploads
- 0
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,
-
01-26-2008, 06:48 AM #8324Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
change it to <mikmod.h>
Zitat von hibbyware
------ 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).
-
01-26-2008, 06:55 AM #8325
^^^ OK, thanks guys.
[email protected] - I changed that, but now ended up with this error:
Spoiler for New Error:PSP: PSP SLIM 2001 TA-088v2Custom Firmware: 5.00 M33-6
-
01-26-2008, 07:28 AM #8326QJ Gamer Bronze
- Registriert seit
- Mar 2007
- Beiträge
- 103
- Points
- 3.754
- Level
- 38
- Downloads
- 0
- Uploads
- 0
#include "mikmod.h" appears in more then one file so it may be worth changing it in all the files,
Like sound.h etc
-
01-26-2008, 07:47 AM #8327
^^^ Did that... Still no luck.
This is frustrating...PSP: PSP SLIM 2001 TA-088v2Custom Firmware: 5.00 M33-6
-
01-26-2008, 07:54 AM #8328QJ Gamer Bronze
- Registriert seit
- Mar 2007
- Beiträge
- 103
- Points
- 3.754
- Level
- 38
- Downloads
- 0
- Uploads
- 0
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,
-
01-26-2008, 08:02 AM #8329Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
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
then it may work
Zitat von lib auto installer
- 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).
-
01-26-2008, 08:05 AM #8330
Thanks hibby & [email protected] :)
[email protected] - I'll add you to msn :)PSP: PSP SLIM 2001 TA-088v2Custom Firmware: 5.00 M33-6
-
01-26-2008, 03:49 PM #8331Banned from QJ for LIFE
- Registriert seit
- Jul 2006
- Beiträge
- 1.557
- Points
- 10.957
- Level
- 69
- Downloads
- 0
- Uploads
- 0
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
-
01-27-2008, 11:56 AM #8332Banned from QJ for LIFE
- Registriert seit
- Jul 2006
- Beiträge
- 1.557
- Points
- 10.957
- Level
- 69
- Downloads
- 0
- Uploads
- 0
the edited file was mainly kat.lua and the ni folder. help plz anyone?
-
01-27-2008, 12:20 PM #8333Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
post the code that you edited and we will help you copy and paste it into [/code] [code] tags
Zitat von mraellis
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).
-
01-27-2008, 01:13 PM #8334Banned from QJ for LIFE
- Registriert seit
- Jul 2006
- Beiträge
- 1.557
- Points
- 10.957
- Level
- 69
- Downloads
- 0
- Uploads
- 0
ok, i'm not certain what it was before though but heres the code now.
kat.lua =
and heres the i.lua its meant to load.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
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.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
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.
-
01-27-2008, 02:01 PM #8335Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
i dont see any errors with that ???
apart from the fact that max select should be 3 shouldn't it ?
as you only have three items in the menuCode:maxselect = 3 -- <-- i think that should be that if select > maxselect then select = 1 end
------ 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).
-
01-27-2008, 02:40 PM #8336Banned from QJ for LIFE
- Registriert seit
- Jul 2006
- Beiträge
- 1.557
- Points
- 10.957
- Level
- 69
- Downloads
- 0
- Uploads
- 0
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.
-
01-27-2008, 02:51 PM #8337Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
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).
-
01-27-2008, 02:55 PM #8338Banned from QJ for LIFE
- Registriert seit
- Jul 2006
- Beiträge
- 1.557
- Points
- 10.957
- Level
- 69
- Downloads
- 0
- Uploads
- 0
sorry that was a typo on my behalf, the files called 1.lua
-
01-27-2008, 08:40 PM #8339QJ Gamer Blue
- Registriert seit
- Jan 2007
- Ort
- U.S.
- Beiträge
- 405
- Points
- 7.014
- Level
- 55
- Downloads
- 0
- Uploads
- 0
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.
-
01-28-2008, 09:13 AM #8340QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
For more on the lua IO library and other methods of doing it, check here: http://lua-users.org/wiki/IoLibraryTutorialCode:file = io.open("myfile","r") numberoflinesinthefile = 0 for line in file:lines() do numberoflinesinthefile = numberoflinesinthefile+1 end file:close()


LinkBack URL
About LinkBacks
Mit Zitat antworten

Hello everyone I am new here and I am glad to be part of this amazing community and I think there...
New to forum