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; u mean eboot.pbp in game% ? PSPBrew is best imo ;) look in http://dl.qj.net for it...
-
12-02-2006, 12:00 PM #4441QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- Middle Europe
- Beiträge
- 1.281
- Points
- 11.800
- Level
- 71
- Downloads
- 0
- Uploads
- 0
[1 Year QJ Member]
[LUA Coder and C Learner]
[Ball Revamped Clone v0.1]
[Phil's Shooting Range v0.3]
[HideFile PRX v2]
[SSR PRX v1.1]
-
12-02-2006, 12:33 PM #4442QJ Gamer Blue
- Registriert seit
- Sep 2006
- Ort
- 6ft. Down Underground........Oh and guess what my avatar is
- Beiträge
- 387
- Points
- 4.918
- Level
- 44
- Downloads
- 0
- Uploads
- 0
ok what do i do?...just change the pic?
-
12-02-2006, 12:33 PM #4443QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- Middle Europe
- Beiträge
- 1.281
- Points
- 11.800
- Level
- 71
- Downloads
- 0
- Uploads
- 0
yes..and remove at3 coz its GTA theme
[1 Year QJ Member]
[LUA Coder and C Learner]
[Ball Revamped Clone v0.1]
[Phil's Shooting Range v0.3]
[HideFile PRX v2]
[SSR PRX v1.1]
-
12-02-2006, 12:45 PM #4444QJ Gamer Blue
- Registriert seit
- Sep 2006
- Ort
- 6ft. Down Underground........Oh and guess what my avatar is
- Beiträge
- 387
- Points
- 4.918
- Level
- 44
- Downloads
- 0
- Uploads
- 0
ok...and on the other one...can I have more then one lua file?
Zitat von myschoo
-
12-02-2006, 12:51 PM #4445QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- Middle Europe
- Beiträge
- 1.281
- Points
- 11.800
- Level
- 71
- Downloads
- 0
- Uploads
- 0
yes...only the 1st one must be named script.lua ...thats the starting one...
u can have as many u want to ;)[1 Year QJ Member]
[LUA Coder and C Learner]
[Ball Revamped Clone v0.1]
[Phil's Shooting Range v0.3]
[HideFile PRX v2]
[SSR PRX v1.1]
-
12-02-2006, 12:57 PM #4446QJ Gamer Blue
- Registriert seit
- Sep 2006
- Ort
- 6ft. Down Underground........Oh and guess what my avatar is
- Beiträge
- 387
- Points
- 4.918
- Level
- 44
- Downloads
- 0
- Uploads
- 0
ok cool, so instead of index you put script
Zitat von myschoo
Oh and i was wandering when my game go's to beta stage will you beta test it?
-
12-02-2006, 01:06 PM #4447QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- Middle Europe
- Beiträge
- 1.281
- Points
- 11.800
- Level
- 71
- Downloads
- 0
- Uploads
- 0
yes script.lua
no problem :)
pls can u tell me how do u change ur "mood" sign under ur name? :)[1 Year QJ Member]
[LUA Coder and C Learner]
[Ball Revamped Clone v0.1]
[Phil's Shooting Range v0.3]
[HideFile PRX v2]
[SSR PRX v1.1]
-
12-02-2006, 01:37 PM #4448QJ Gamer Blue
- Registriert seit
- Sep 2006
- Ort
- 6ft. Down Underground........Oh and guess what my avatar is
- Beiträge
- 387
- Points
- 4.918
- Level
- 44
- Downloads
- 0
- Uploads
- 0
yea go to editoptions...and change it their
Zitat von myschoo
-
12-02-2006, 01:56 PM #4449QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- Middle Europe
- Beiträge
- 1.281
- Points
- 11.800
- Level
- 71
- Downloads
- 0
- Uploads
- 0
it works! thx thx :)
[1 Year QJ Member]
[LUA Coder and C Learner]
[Ball Revamped Clone v0.1]
[Phil's Shooting Range v0.3]
[HideFile PRX v2]
[SSR PRX v1.1]
-
12-02-2006, 01:59 PM #4450QJ Gamer Blue
- Registriert seit
- Sep 2006
- Ort
- 6ft. Down Underground........Oh and guess what my avatar is
- Beiträge
- 387
- Points
- 4.918
- Level
- 44
- Downloads
- 0
- Uploads
- 0
no problem
Zitat von myschoo
-
12-02-2006, 02:04 PM #4451Ponies and Unicorns
- Registriert seit
- Aug 2006
- Ort
- Pelennor Fields
- Beiträge
- 547
- Points
- 5.778
- Level
- 49
- Downloads
- 0
- Uploads
- 0
when i change the variable currentarea should i assign the picture variables used in the previous area to "nil" to save ram space or is it fine???
If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
Gold donations are highly appreciated!
-
12-02-2006, 02:08 PM #4452QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- Middle Europe
- Beiträge
- 1.281
- Points
- 11.800
- Level
- 71
- Downloads
- 0
- Uploads
- 0
i think if u use dofile they will still stay in RAM
[1 Year QJ Member]
[LUA Coder and C Learner]
[Ball Revamped Clone v0.1]
[Phil's Shooting Range v0.3]
[HideFile PRX v2]
[SSR PRX v1.1]
-
12-02-2006, 02:11 PM #4453Ponies and Unicorns
- Registriert seit
- Aug 2006
- Ort
- Pelennor Fields
- Beiträge
- 547
- Points
- 5.778
- Level
- 49
- Downloads
- 0
- Uploads
- 0
Im trying not to use dofiles right now both my areas are in 1 file index.lua but I see a lot of posts about people saying the psp crashed because of the ram overload on picture files so i was wondering if i need to assign them to nil or not or if that will even do anything.
If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
Gold donations are highly appreciated!
-
12-02-2006, 02:53 PM #4454QJ Gamer Green
- Registriert seit
- Dec 2005
- Ort
- Here
- Beiträge
- 2.715
- Points
- 13.310
- Level
- 75
- Downloads
- 0
- Uploads
- 0
???
its fine. just do
if currentarea = something then
blit this image
if not then
blit this one
the psp shouldnt get an overload from that..i do it all the time[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
-
12-02-2006, 03:15 PM #4455Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
Zitat von GuitarGod1134
it depends. is your player allowed to back to that area? if its gone forever, then just make it nil, otherwise keep it.--------------------------------------------------------------------------------------
-
12-02-2006, 03:42 PM #4456Ponies and Unicorns
- Registriert seit
- Aug 2006
- Ort
- Pelennor Fields
- Beiträge
- 547
- Points
- 5.778
- Level
- 49
- Downloads
- 0
- Uploads
- 0
ok thanks alright well i made this little app while i was waiting for some responses and im getting an error something at like 49 with is the eof but idk whats wrong.
edit : lol nvm i never put while true do lol.If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
Gold donations are highly appreciated!
-
12-02-2006, 04:00 PM #4457QJ Gamer Blue
- Registriert seit
- Aug 2006
- Ort
- Missouri
- Beiträge
- 451
- Points
- 6.041
- Level
- 50
- Downloads
- 0
- Uploads
- 0
I'm having trouble with exiting my menu.
It waits about 10 seconds and shuts completely off. So it won't go to the XMB like it's supposed to.Code:black = Color.new(0,0,0) red = Color.new(255,0,0) white = Color.new(255,255,255) menustatus = 1 stickmenu = Image.load("stickmenu.png") oldpad = Controls.read() while true do pad = Controls.read() screen:clear(white) screen:blit(0,0,stickmenu) screen:print(180,170,"Single Player",black) screen:print(180,180,"Multiplayer",black) screen:print(180,190,"Controls",black) screen:print(180,200,"Exit",black) if menustatus == 1 then screen:print(180,170,"Single Player",red) end if menustatus == 2 then screen:print(180,180,"Multiplayer",red) end if menustatus == 3 then screen:print(180,190,"Controls",red) end if menustatus == 4 then screen:print(180,200,"Exit",red) end if pad:down() and oldpad:down() ~= pad:down() then menustatus = menustatus + 1 end if pad:up() and oldpad:up() ~= pad:up() then menustatus = menustatus - 1 end if menustatus == 0 then menustatus = 4 end if menustatus == 5 then menustatus = 1 end if pad:cross() and menustatus == 1 then --code-- end if pad:cross() and menustatus == 2 then --code-- end if pad:cross() and menustatus == 3 then --code-- end if pad:cross() and menustatus == 4 then os.exit() end screen.waitVblankStart() screen.flip() oldpad = pad end
-
12-02-2006, 06:33 PM #4458Ponies and Unicorns
- Registriert seit
- Aug 2006
- Ort
- Pelennor Fields
- Beiträge
- 547
- Points
- 5.778
- Level
- 49
- Downloads
- 0
- Uploads
- 0
whats wrong with home? if u want to go to the xmb?
If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
Gold donations are highly appreciated!
-
12-02-2006, 07:37 PM #4459QJ Gamer Gold
- Registriert seit
- Nov 2006
- Ort
- ...
- Beiträge
- 2.080
- Points
- 11.942
- Level
- 71
- Downloads
- 0
- Uploads
- 0
i just have a quick question so here it is:
??Why is it when i look at my picture using luaplayer for windows, it flickers??
-
12-02-2006, 07:49 PM #4460Ponies and Unicorns
- Registriert seit
- Aug 2006
- Ort
- Pelennor Fields
- Beiträge
- 547
- Points
- 5.778
- Level
- 49
- Downloads
- 0
- Uploads
- 0
something to do with the loop repeating i guess.
If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
Gold donations are highly appreciated!
-
12-02-2006, 08:06 PM #4461QJ Gamer Gold
- Registriert seit
- Nov 2006
- Ort
- ...
- Beiträge
- 2.080
- Points
- 11.942
- Level
- 71
- Downloads
- 0
- Uploads
- 0
is there any way i can fix it?
-
12-02-2006, 08:16 PM #4462QJ Gamer Blue
- Registriert seit
- Aug 2006
- Ort
- Missouri
- Beiträge
- 451
- Points
- 6.041
- Level
- 50
- Downloads
- 0
- Uploads
- 0
Because no one likes the home button. Now can someone help...
Zitat von GuitarGod1134
-
12-02-2006, 08:43 PM #4463QJ Gamer Gold
- Registriert seit
- Aug 2006
- Beiträge
- 1.633
- Points
- 11.629
- Level
- 70
- Downloads
- 0
- Uploads
- 0
if pad:cross() then os.exit() end
Doesn't that work?
-
12-02-2006, 08:53 PM #4464QJ Gamer Blue
- Registriert seit
- Aug 2006
- Ort
- Missouri
- Beiträge
- 451
- Points
- 6.041
- Level
- 50
- Downloads
- 0
- Uploads
- 0
No... I said it freezes and shuts off completely in 10 seconds.
-
12-02-2006, 08:54 PM #4465QJ Gamer Gold
- Registriert seit
- Aug 2006
- Beiträge
- 1.633
- Points
- 11.629
- Level
- 70
- Downloads
- 0
- Uploads
- 0
Get the custom luaplayer by cools and use System.quit()
-
12-02-2006, 08:57 PM #4466QJ Gamer Blue
- Registriert seit
- Aug 2006
- Ort
- Missouri
- Beiträge
- 451
- Points
- 6.041
- Level
- 50
- Downloads
- 0
- Uploads
- 0
cant find it. can i get a link?
-
12-02-2006, 09:11 PM #4467QJ Gamer Gold
- Registriert seit
- Aug 2006
- Beiträge
- 1.633
- Points
- 11.629
- Level
- 70
- Downloads
- 0
- Uploads
- 0
Just search for it, its a couple pages back here in the psp development forum.
-
12-02-2006, 09:32 PM #4468QJ Gamer Blue
- Registriert seit
- Aug 2006
- Ort
- Missouri
- Beiträge
- 451
- Points
- 6.041
- Level
- 50
- Downloads
- 0
- Uploads
- 0
oh i thought it was on dl.qj.net
-= Double Post =-
search isn't picking it up.
-= Double Post =-
Now i wanna know how to keep my controls menu on the screen when i press X so I don't have to hold X down. So I go to controls on the main menu. I press X and I want it to keep the controls menu up. What it does now is make me hold down the button for it to stay up.
And the dofile("controls.lua") isCode:black = Color.new(0,0,0) red = Color.new(255,0,0) white = Color.new(255,255,255) menustatus = 1 stickmenu = Image.load("backgrounds/stickmenu.png") controlsmenu = Image.load("backgrounds/controlsmenu.png") oldpad = Controls.read() while true do pad = Controls.read() screen:clear(white) screen:blit(0,0,stickmenu) screen:print(180,170,"Single Player",black) screen:print(180,180,"Multiplayer",black) screen:print(180,190,"Controls",black) if menustatus == 1 then screen:print(180,170,"Single Player",red) end if menustatus == 2 then screen:print(180,180,"Multiplayer",red) end if menustatus == 3 then screen:print(180,190,"Controls",red) end if pad:down() and oldpad:down() ~= pad:down() then menustatus = menustatus + 1 end if pad:up() and oldpad:up() ~= pad:up() then menustatus = menustatus - 1 end if menustatus == 0 then menustatus = 3 end if menustatus == 4 then menustatus = 1 end if pad:cross() and menustatus == 1 then dofile("singleplayer.lua") end if pad:cross() and menustatus == 2 then dofile("multiplayer.lua") end if pad:cross() and menustatus == 3 then dofile("controls.lua") end if pad:l() and pad:r() then System.usbDiskModeActivate() end screen.waitVblankStart() screen.flip() oldpad = pad endwithout the quotes of course.Code:screen:clear(white) screen:blit(0,0,controlsmenu)
Geändert von Cheez Pirate (12-02-2006 um 09:32 PM Uhr) Grund: Automerged Doublepost
-
12-02-2006, 09:35 PM #4469QJ Gamer Gold
- Registriert seit
- Aug 2006
- Beiträge
- 1.633
- Points
- 11.629
- Level
- 70
- Downloads
- 0
- Uploads
- 0
Code:black = Color.new(0,0,0) red = Color.new(255,0,0) white = Color.new(255,255,255) menustatus = 1 blitcm = false stickmenu = Image.load("backgrounds/stickmenu.png") controlsmenu = Image.load("backgrounds/controlsmenu.png") oldpad = Controls.read() while true do pad = Controls.read() screen:clear(white) screen:blit(0,0,stickmenu) screen:print(180,170,"Single Player",black) screen:print(180,180,"Multiplayer",black) screen:print(180,190,"Controls",black) if menustatus == 1 then screen:print(180,170,"Single Player",red) end if menustatus == 2 then screen:print(180,180,"Multiplayer",red) end if menustatus == 3 then screen:print(180,190,"Controls",red) end if pad:down() and oldpad:down() ~= pad:down() then menustatus = menustatus + 1 end if pad:up() and oldpad:up() ~= pad:up() then menustatus = menustatus - 1 end if menustatus == 0 then menustatus = 3 end if menustatus == 4 then menustatus = 1 end if pad:cross() and menustatus == 1 then dofile("singleplayer.lua") end if pad:cross() and menustatus == 2 then dofile("multiplayer.lua") end if pad:cross() and menustatus == 3 then blitcm = true end if pad:l() and pad:r() then System.usbDiskModeActivate() end if blitcm then screen:blit(0,0,controlsmenu) end screen.waitVblankStart() screen.flip() oldpad = pad end
-
12-03-2006, 01:06 AM #4470QJ Gamer Green
- Registriert seit
- Dec 2005
- Ort
- Here
- Beiträge
- 2.715
- Points
- 13.310
- Level
- 75
- Downloads
- 0
- Uploads
- 0
...or the code may be inefficient. wrongly place "screen:clear"s, "screen.waitVblankStart"s , and "screen.flip"s can do that.
Zitat von kinghiei
-= Double Post =-
to Cheez Pirate: i think its doing that because the controls.lua file doesnt have a loop. it just does those two lines of code then quits. unless theres more youre not saying.Geändert von EminentJonFrost (12-03-2006 um 01:06 AM Uhr) Grund: Automerged Doublepost
[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]


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