Zeige Ergebnis 211 bis 240 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; nvm ill post it sokmewhere else...
-
11-02-2005, 07:08 PM #211Asleep...

- Registriert seit
- Oct 2005
- Beiträge
- 1.383
- Points
- 11.516
- Level
- 70
- Downloads
- 0
- Uploads
- 0
.....
nvm ill post it sokmewhere else
Geändert von HEDZX (11-02-2005 um 07:17 PM Uhr) Grund: ??
-
11-02-2005, 07:28 PM #212Advanced PSP Coder
- Registriert seit
- Oct 2005
- Ort
- Down South
- Beiträge
- 426
- Points
- 7.141
- Level
- 55
- Downloads
- 0
- Uploads
- 0
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]
-
11-02-2005, 08:56 PM #213QJ Gamer Blue
- Registriert seit
- Oct 2005
- Ort
- State College, PA
- Beiträge
- 66
- Points
- 4.582
- Level
- 43
- Downloads
- 0
- Uploads
- 0
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 '{' "
-
11-02-2005, 11:02 PM #214QJ Gamer Blue
- Registriert seit
- Oct 2005
- Ort
- State College, PA
- Beiträge
- 66
- Points
- 4.582
- Level
- 43
- Downloads
- 0
- Uploads
- 0
found a way:
marked = {}
i = 0
while i < 16 do
marked[i] = {}
j = 0
while j < 16 do
marked[i][j] = 0
j = j + 1
end
i = i + 1
end
-
11-03-2005, 08:29 AM #215words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
i cant acces the resizer page post the code here

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
11-03-2005, 07:04 PM #216QJ Gamer Silver
- Registriert seit
- Aug 2005
- Ort
- MD | Fries: 13
- Beiträge
- 1.019
- Points
- 6.843
- Level
- 54
- Downloads
- 0
- Uploads
- 0
whats the problem with this script?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
-
11-03-2005, 07:09 PM #217...

- Registriert seit
- Oct 2005
- Ort
- The US of A Hombrew: Quak Arena Projects: RIFT
- Beiträge
- 381
- Points
- 10.603
- Level
- 68
- Downloads
- 0
- Uploads
- 0
i think it should just be screen:waitVblankStart( ) without the 0
...
-
11-03-2005, 07:12 PM #218QJ Gamer Silver
- Registriert seit
- Aug 2005
- Ort
- MD | Fries: 13
- Beiträge
- 1.019
- Points
- 6.843
- Level
- 54
- Downloads
- 0
- Uploads
- 0
lemme try it....
Zitat von xigency
hmm.. same error.
the exact error i am getting is:
'=' expected near '<eof>'
yes, its on line 14
-
11-03-2005, 07:49 PM #219
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]
-
11-03-2005, 07:57 PM #220QJ Gamer Silver
- Registriert seit
- Aug 2005
- Ort
- MD | Fries: 13
- Beiträge
- 1.019
- Points
- 6.843
- Level
- 54
- Downloads
- 0
- Uploads
- 0
thx, but now im getting a new error. That was the entire code, too. therror is on line one:
Zitat von Lancer
'attempt to index global 'pad' (a nil value)
please dont go hard on me, im only a newb at this.
-
11-03-2005, 09:14 PM #221
It's okay, we're all newbies when we start out.
Pad was a nil value because you didn't give it one. You have to do "pad = Controls.read()". You could also change pad to anything else, such as "input = Controls.read()", then you would check what button is being pressed with "input:circle()", for example.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.Geändert von Lancer (11-03-2005 um 09:31 PM Uhr)
[IMG]http://i43.photobucket.com/albums/e361/Lancer2D/signatures/lancerghost.png[/IMG]
-
11-03-2005, 09:21 PM #222
screen.clear()?
Zitat von Lancer
You mean screen:clear()
-
11-03-2005, 09:35 PM #223
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]
-
11-04-2005, 07:46 AM #224QJ Gamer Gold
- Registriert seit
- Jul 2005
- Ort
- GA | Banned: 3 | Warned: 3
- Beiträge
- 2.253
- Points
- 12.479
- Level
- 73
- Downloads
- 0
- Uploads
- 0
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!!!!
-
11-04-2005, 08:50 AM #225Advanced PSP Coder
- Registriert seit
- Oct 2005
- Ort
- Down South
- Beiträge
- 426
- Points
- 7.141
- Level
- 55
- Downloads
- 0
- Uploads
- 0
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]
-
11-04-2005, 09:05 AM #226QJ Gamer Gold
- Registriert seit
- Jul 2005
- Ort
- GA | Banned: 3 | Warned: 3
- Beiträge
- 2.253
- Points
- 12.479
- Level
- 73
- Downloads
- 0
- Uploads
- 0
It going to be text, kiind of like links, you know. Meaning, you go on link, start for this example, and it starts the game, etc.
-
11-04-2005, 09:54 AM #227QJ Gamer Gold
- Registriert seit
- Jul 2005
- Ort
- GA | Banned: 3 | Warned: 3
- Beiträge
- 2.253
- Points
- 12.479
- Level
- 73
- Downloads
- 0
- Uploads
- 0
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?
-
11-04-2005, 09:57 AM #228Advanced PSP Coder
- Registriert seit
- Oct 2005
- Ort
- Down South
- Beiträge
- 426
- Points
- 7.141
- Level
- 55
- Downloads
- 0
- Uploads
- 0
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]
-
11-04-2005, 10:11 AM #229QJ Gamer Gold
- Registriert seit
- Jul 2005
- Ort
- GA | Banned: 3 | Warned: 3
- Beiträge
- 2.253
- Points
- 12.479
- Level
- 73
- Downloads
- 0
- Uploads
- 0
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.
-
11-04-2005, 10:26 AM #230QJ Gamer Silver
- Registriert seit
- Aug 2005
- Ort
- MD | Fries: 13
- Beiträge
- 1.019
- Points
- 6.843
- Level
- 54
- Downloads
- 0
- Uploads
- 0
anybody know how i can create labels?
like:
lbl b
then later:
goto b
-
11-04-2005, 10:39 AM #231Advanced PSP Coder
- Registriert seit
- Oct 2005
- Ort
- Down South
- Beiträge
- 426
- Points
- 7.141
- Level
- 55
- Downloads
- 0
- Uploads
- 0
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]
-
11-04-2005, 10:48 AM #232QJ Gamer Silver
- Registriert seit
- Aug 2005
- Ort
- MD | Fries: 13
- Beiträge
- 1.019
- Points
- 6.843
- Level
- 54
- Downloads
- 0
- Uploads
- 0
damn, on my opinion that's the most helpful part of coding....
Zitat von Virtue
-
11-04-2005, 12:03 PM #233QJ Gamer Gold
- Registriert seit
- Jul 2005
- Ort
- GA | Banned: 3 | Warned: 3
- Beiträge
- 2.253
- Points
- 12.479
- Level
- 73
- Downloads
- 0
- Uploads
- 0
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
-
11-04-2005, 12:56 PM #234NDS Mod
- Registriert seit
- Jul 2005
- Ort
- w00+land
- Beiträge
- 645
- Points
- 18.386
- Level
- 86
- Downloads
- 0
- Uploads
- 0
That's because System.usbDiskModeActivat e() turn on the usb, it doesn't return a value. You also don't need else there. Also leave out the false, unless you don't want your picture to have transparency at the parts it had transparency in the .png.
Zitat von Master Inuyasha
Here, try this:
ignore the strange spaces in the middle of the usbDiskModeActivate and usbDiskModeDeactivate, it's just something the forum does.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]
-
11-04-2005, 12:59 PM #235NDS Mod
- Registriert seit
- Jul 2005
- Ort
- w00+land
- Beiträge
- 645
- Points
- 18.386
- Level
- 86
- Downloads
- 0
- Uploads
- 0
Labels are pointless since there are loops and functions.
Zitat von st.jimmy
"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]
-
11-04-2005, 01:20 PM #236Advanced PSP Coder
- Registriert seit
- Oct 2005
- Ort
- Down South
- Beiträge
- 426
- Points
- 7.141
- Level
- 55
- Downloads
- 0
- Uploads
- 0
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]
-
11-04-2005, 03:14 PM #237QJ Gamer Silver
- Registriert seit
- Aug 2005
- Ort
- MD | Fries: 13
- Beiträge
- 1.019
- Points
- 6.843
- Level
- 54
- Downloads
- 0
- Uploads
- 0
well then how do i make a loop?
-
11-04-2005, 03:27 PM #238Advanced PSP Coder
- Registriert seit
- Oct 2005
- Ort
- Down South
- Beiträge
- 426
- Points
- 7.141
- Level
- 55
- Downloads
- 0
- Uploads
- 0
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]
-
11-04-2005, 03:30 PM #239QJ Gamer Silver
- Registriert seit
- Aug 2005
- Ort
- MD | Fries: 13
- Beiträge
- 1.019
- Points
- 6.843
- Level
- 54
- Downloads
- 0
- Uploads
- 0
ohkay?
Zitat von Virtue
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.
-
11-04-2005, 07:19 PM #240words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
wats the resizer function

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here


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