![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on Lua Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; nvm ill post it sokmewhere else :sad:...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#212 |
![]() Advanced PSP Coder
|
I answered it, but future lua help, please ask here.
__________________
[center][COLOR=Green][B]- PM Me if you need help with anything - [/B] [/COLOR] [B][SIZE=3][COLOR=DarkOrange][U]Homebrew I've Made[/U][/COLOR][/SIZE][/B] [B]Applications: [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,17,1667]PSP Alarm v0.5[/URL] [/b] [B]Games: [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1669] Virtual Escape DEMO[/URL] [w/ Lancer] [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1577]PSP Dodge v1.0[/URL][/b] [img]http://img517.imageshack.us/img517/4735/sig3qu.jpg[/img][/center] |
|
|
|
|
|
#213 |
![]() |
Are double arrays possible in lua (ie count[i][j])? I thought I remembered reading they are and set mine up as follows:
marked = {}{} -- initialize marked[i][j] = 3 --later and when trying to run on luaplayer i get a general error message, "unexpected symbol near '{' " |
|
|
|
|
|
#215 |
![]() ![]() ...in a dream...
|
i cant acces the resizer page post the code here
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) |
|
|
|
|
|
#216 |
![]() |
Code:
if pad:cross() then screen:print(50,60, "you pressed x, buddy") end if pad:circle() then screen:print(50,60, "that was a circle") end if pad:triangle() then screen:print(30,60, "my calculations say that you just pressed triangle") end if pad:square() then screen:print(50,60, "you're a square") end screen.waitVblankStart(0) screen.flip |
|
|
|
|
|
#218 | |
![]() |
Quote:
hmm.. same error. the exact error i am getting is: '=' expected near '<eof>' yes, its on line 14 |
|
|
|
|
|
|
#219 |
![]() Premium Member
|
screen.flip()
Edit: If that doesn't work, then post the full code. If that is the full code, then you need to add a loop and screen:clear().
__________________
[IMG]http://i43.photobucket.com/albums/e361/Lancer2D/signatures/lancerghost.png[/IMG] |
|
|
|
|
|
#220 | |
![]() |
Quote:
'attempt to index global 'pad' (a nil value) please dont go hard on me, im only a newb at this. |
|
|
|
|
|
|
#221 |
![]() Premium Member
|
It's okay, we're all newbies when we start out.
Code:
white = Color.new(255,255,255)
while not pad:start() do
pad = Controls.read()
if pad:cross() then
screen:print(50,60, "you pressed x, buddy", white)
end
if pad:circle() then
screen:print(50,60, "that was a circle", white)
end
if pad:triangle() then
screen:print(30,60, "my calculations say that you just pressed triangle", white)
end
if pad:square() then
screen:print(50,60, "you're a square", white)
end
screen.waitVblankStart()
screen.flip()
screen:clear()
end
If your code isn't in a loop, then LuaPlayer will go through the code once, then end the program. I set the loop to go until it detects that you are pressing the start button. After "screen.flip()" you should put "screen:clear()" to clear the backbuffer, or else the backbuffer will have the image from the previous screen. It might help if I drew an example for you. Tell me if you want me to explain something in more detail. It's always nice to know how things work, rather than just knowing that they do.
__________________
[IMG]http://i43.photobucket.com/albums/e361/Lancer2D/signatures/lancerghost.png[/IMG] Last edited by Lancer; 11-03-2005 at 09:31 PM.. |
|
|
|
|
|
#222 | |
![]() ![]() total-Z
|
Quote:
You mean screen:clear() |
|
|
|
|
|
|
#223 |
![]() Premium Member
|
Yes, screen:clear(). >_>
Instead of "screen.flip()", you can use "screen:flip()" if you want. This brings me to a question that I need answered: what are the meanings of ":" and "."? The fact that both "screen.flip()" and "screen:flip()" work, yet "screen.clear()" doesn't confuses me. =P
__________________
[IMG]http://i43.photobucket.com/albums/e361/Lancer2D/signatures/lancerghost.png[/IMG] |
|
|
|
|
|
#224 |
![]() |
Okay, can someone help me with a startup menu. I have the background and all, but how do i make text appear, and you can select it. ALso, how can you order your script so you know what is what? Thanks, also anyone willing to teach me lua like alot of stuff, pm me! Thanks in advance!!!!
|
|
|
|
|
|
#225 |
![]() Advanced PSP Coder
|
Are you planning to use images or text on the menu? For like all the options, like start game, etc. Will it be images or text?
__________________
[center][COLOR=Green][B]- PM Me if you need help with anything - [/B] [/COLOR] [B][SIZE=3][COLOR=DarkOrange][U]Homebrew I've Made[/U][/COLOR][/SIZE][/B] [B]Applications: [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,17,1667]PSP Alarm v0.5[/URL] [/b] [B]Games: [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1669] Virtual Escape DEMO[/URL] [w/ Lancer] [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1577]PSP Dodge v1.0[/URL][/b] [img]http://img517.imageshack.us/img517/4735/sig3qu.jpg[/img][/center] |
|
|
|
|
|
#227 |
![]() |
Im having a problem, the code ive scripted so far works perfectly in the lua player, but once i turn it in an eboot, doing what anotehr user said to do, it doesnt do all the code. What do you think is wrong?
|
|
|
|
|
|
#228 |
![]() Advanced PSP Coder
|
I can fix it, but you will have to wait until I get home. I'll fix it then. What exactly have you tried to do?
__________________
[center][COLOR=Green][B]- PM Me if you need help with anything - [/B] [/COLOR] [B][SIZE=3][COLOR=DarkOrange][U]Homebrew I've Made[/U][/COLOR][/SIZE][/B] [B]Applications: [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,17,1667]PSP Alarm v0.5[/URL] [/b] [B]Games: [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1669] Virtual Escape DEMO[/URL] [w/ Lancer] [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1577]PSP Dodge v1.0[/URL][/b] [img]http://img517.imageshack.us/img517/4735/sig3qu.jpg[/img][/center] |
|
|
|
|
|
#229 |
![]() |
dont know who said it, but a guy said, get an eboot that is used with a lua application. I did that. Then he said open it up, the put your own icon0 etc to make it your own. I did that. I included the pictures, but the tricked out loading screen i made skipps from 0% all the way to the menu! I wonder why. BTW, when do you get back from school? Im in Florida, so i dont have to go to school because of Hurricane Wilma.
|
|
|
|
|
|
#231 |
![]() Advanced PSP Coder
|
No, you don't really need to use labels.
Cause you just do like, if whatever = true then So, you don't really need any labels or goto's, but either way I don't know how. Sorry
__________________
[center][COLOR=Green][B]- PM Me if you need help with anything - [/B] [/COLOR] [B][SIZE=3][COLOR=DarkOrange][U]Homebrew I've Made[/U][/COLOR][/SIZE][/B] [B]Applications: [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,17,1667]PSP Alarm v0.5[/URL] [/b] [B]Games: [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1669] Virtual Escape DEMO[/URL] [w/ Lancer] [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1577]PSP Dodge v1.0[/URL][/b] [img]http://img517.imageshack.us/img517/4735/sig3qu.jpg[/img][/center] |
|
|
|
|
|
#232 | |
![]() |
Quote:
|
|
|
|
|
|
|
#233 |
![]() |
okay, im having trouble with this peice of code. Now, i want to do, is if usb mode is active, it shows a little picture, here is what i did, and it doesnt work
if System.usbDiskModeActivat e() true then screen.blit(460, 260, usb, false) else end |
|
|
|
|
|
#234 | |
![]() NDS Mod
|
Quote:
Here, try this: Code:
usbStatus; function usbON() System.usbDiskModeActivate() usbStatus = true end function usbOFF() System.usbDiskModeDeactivate() usbStatus = false end if UsbStatus then screen.blit(460, 260, usb) end
__________________
"15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me [URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL] |
|
|
|
|
|
|
#235 | |
![]() NDS Mod
|
Quote:
__________________
"15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me [URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL] |
|
|
|
|
|
|
#236 |
![]() Advanced PSP Coder
|
Exactly what I said ^
__________________
[center][COLOR=Green][B]- PM Me if you need help with anything - [/B] [/COLOR] [B][SIZE=3][COLOR=DarkOrange][U]Homebrew I've Made[/U][/COLOR][/SIZE][/B] [B]Applications: [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,17,1667]PSP Alarm v0.5[/URL] [/b] [B]Games: [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1669] Virtual Escape DEMO[/URL] [w/ Lancer] [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1577]PSP Dodge v1.0[/URL][/b] [img]http://img517.imageshack.us/img517/4735/sig3qu.jpg[/img][/center] |
|
|
|
|
|
#238 |
![]() Advanced PSP Coder
|
while true do
__________________
[center][COLOR=Green][B]- PM Me if you need help with anything - [/B] [/COLOR] [B][SIZE=3][COLOR=DarkOrange][U]Homebrew I've Made[/U][/COLOR][/SIZE][/B] [B]Applications: [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,17,1667]PSP Alarm v0.5[/URL] [/b] [B]Games: [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1669] Virtual Escape DEMO[/URL] [w/ Lancer] [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1577]PSP Dodge v1.0[/URL][/b] [img]http://img517.imageshack.us/img517/4735/sig3qu.jpg[/img][/center] |
|
|
|
|
|
#239 | |
![]() |
Quote:
i just dont see how that will make the program loop over and over again. well i have a problem where the 'end' code is executed before i can press a button.... i know that you have seen the script. |
|
|
|
|
|
|
#240 |
![]() ![]() ...in a dream...
|
wats the resizer function
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) |
|
|
|
![]() |
| Tags |
| code , lib , lua , luaplayer , noobs , programming , psp programming , scripting , thread |
| Thread Tools | |
|
|