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; Zitat von Fear inc. His name is VAVA now ;) . And he isn't leaving lol. What game you making? ...
-
05-02-2006, 10:07 AM #1951QJ Gamer Green
- Registriert seit
- Dec 2005
- Ort
- Here
- Beiträge
- 2.715
- Points
- 13.310
- Level
- 75
- Downloads
- 0
- Uploads
- 0
is that directed at me?
Zitat von Fear inc.
[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
-
05-02-2006, 10:14 AM #195211th Squad Captain
- Registriert seit
- Jun 2005
- Ort
- You are here -----> 名前: アダム | 飲むコー
- Beiträge
- 2.562
- Points
- 26.490
- Level
- 97
- Downloads
- 0
- Uploads
- 0
Yes, it was :) .
Zitat von EminentJonFrost
FAVORITE GAME! - BEER & ANIME! - SO EXICTING!

開発者, 携帯用プログラマー 日本サポータおよび恋人 本名のアダムの鍛冶屋
Currently Working On: - Flashmod V2.50 - Flashmod V2.60
Currently Drinking: Coffee! - 私はコーヒーを飲む
Chao Garden: DEMO v0.6
Chao Garden V0.5b Review!
-
05-02-2006, 10:29 AM #1953QJ Gamer Green
- Registriert seit
- Dec 2005
- Ort
- Here
- Beiträge
- 2.715
- Points
- 13.310
- Level
- 75
- Downloads
- 0
- Uploads
- 0
umm...i dont want to say (at least not publicly).
Zitat von Fear inc.
my partner may not want to.
and honestly, i dont want to say.[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
-
05-02-2006, 11:28 AM #1954
How do i got about taking info from a text file? Such as variables etc. For a config file.
D:
-
05-02-2006, 11:31 AM #1955QJ Gamer Green
- Registriert seit
- Nov 2005
- Ort
- Sweden
- Beiträge
- 460
- Points
- 6.520
- Level
- 52
- Downloads
- 0
- Uploads
- 0
Please help me out guys!
Everytime i turn of my psp while i am in my program, and then turn it on, it says that a variable is a nil value, it shoulden't be that way and i can't se why it should behave like it do.
I have seen this problem before but don't remember how i solved it.
I have checked so the variable is the exactly same in all the places.
This is the only problem i have, everything works perfect otherwise![CENTER]Some of my homebrew Applications/Games:
[URL=http://forums.qj.net/showthread.php?t=47294&page=1&pp=10]Planet Fighter[/URL] | [URL=http://forums.qj.net/showthread.php?p=641672#post641672]Graphic Creator (V2.0)[/URL] | [URL=http://forums.qj.net/showthread.php?p=512717]Fire Pong[/URL] | [B][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html#post1430891"][COLOR="Red"][SIZE="3"]Brushes v2.0[/COLOR][/SIZE][/B][/URL] [URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][B][SIZE="2"][COLOR="Black"]Released![/COLOR][/SIZE][/B][/URL]
[URL="http://haxxblaster.2u.se/"][COLOR="black"][FONT="Arial Black"]www.HaxxBlaster.com[/FONT][/COLOR][/URL]
[URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][IMG]http://img19.imageshack.us/img19/1346/brushesbannerqz3.png[/IMG][/URL][/CENTER]
-
05-02-2006, 11:32 AM #195611th Squad Captain
- Registriert seit
- Jun 2005
- Ort
- You are here -----> 名前: アダム | 飲むコー
- Beiträge
- 2.562
- Points
- 26.490
- Level
- 97
- Downloads
- 0
- Uploads
- 0
Like a dofile?
Zitat von Gutya
Example:
Or what aboutCode:dofile("txt.txt")
Code:file = io.open("txt.txt", "r") if file then text = file5:read("*a") file:close() endFAVORITE GAME! - BEER & ANIME! - SO EXICTING!

開発者, 携帯用プログラマー 日本サポータおよび恋人 本名のアダムの鍛冶屋
Currently Working On: - Flashmod V2.50 - Flashmod V2.60
Currently Drinking: Coffee! - 私はコーヒーを飲む
Chao Garden: DEMO v0.6
Chao Garden V0.5b Review!
-
05-02-2006, 11:34 AM #1957
Could you explain this please? Like what each part does?
Zitat von Fear inc.
D:
-
05-02-2006, 11:35 AM #1958
You can't turn off your PSP during a LUA game then turn it back on and cary on.
Zitat von HaxxBlaster
D:
-
05-02-2006, 11:37 AM #195911th Squad Captain
- Registriert seit
- Jun 2005
- Ort
- You are here -----> 名前: アダム | 飲むコー
- Beiträge
- 2.562
- Points
- 26.490
- Level
- 97
- Downloads
- 0
- Uploads
- 0
Theres a good tutorial here:
Zitat von Gutya
http://www.evilmana.com/tutorials/lua_tutorial_09.php
This will do a whole good for you ;) .
Its better than getting a 10 second mockup from me,
and it use's other strategies too.FAVORITE GAME! - BEER & ANIME! - SO EXICTING!

開発者, 携帯用プログラマー 日本サポータおよび恋人 本名のアダムの鍛冶屋
Currently Working On: - Flashmod V2.50 - Flashmod V2.60
Currently Drinking: Coffee! - 私はコーヒーを飲む
Chao Garden: DEMO v0.6
Chao Garden V0.5b Review!
-
05-02-2006, 11:38 AM #1960QJ Gamer Green
- Registriert seit
- Nov 2005
- Ort
- Sweden
- Beiträge
- 460
- Points
- 6.520
- Level
- 52
- Downloads
- 0
- Uploads
- 0
Gutya
That's just pure bull****!
I have done it atleast a thousand times before with my own programs.[CENTER]Some of my homebrew Applications/Games:
[URL=http://forums.qj.net/showthread.php?t=47294&page=1&pp=10]Planet Fighter[/URL] | [URL=http://forums.qj.net/showthread.php?p=641672#post641672]Graphic Creator (V2.0)[/URL] | [URL=http://forums.qj.net/showthread.php?p=512717]Fire Pong[/URL] | [B][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html#post1430891"][COLOR="Red"][SIZE="3"]Brushes v2.0[/COLOR][/SIZE][/B][/URL] [URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][B][SIZE="2"][COLOR="Black"]Released![/COLOR][/SIZE][/B][/URL]
[URL="http://haxxblaster.2u.se/"][COLOR="black"][FONT="Arial Black"]www.HaxxBlaster.com[/FONT][/COLOR][/URL]
[URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][IMG]http://img19.imageshack.us/img19/1346/brushesbannerqz3.png[/IMG][/URL][/CENTER]
-
05-02-2006, 11:41 AM #1961
Oh thanks, forgot about that tutorial.
Zitat von Fear inc.
Well ive never heard of that, are you talking about LUA?
Zitat von HaxxBlaster
D:
-
05-02-2006, 11:42 AM #196211th Squad Captain
- Registriert seit
- Jun 2005
- Ort
- You are here -----> 名前: アダム | 飲むコー
- Beiträge
- 2.562
- Points
- 26.490
- Level
- 97
- Downloads
- 0
- Uploads
- 0
If your stuck PM me :) .
Zitat von Gutya
I Will try my best to help you asap.FAVORITE GAME! - BEER & ANIME! - SO EXICTING!

開発者, 携帯用プログラマー 日本サポータおよび恋人 本名のアダムの鍛冶屋
Currently Working On: - Flashmod V2.50 - Flashmod V2.60
Currently Drinking: Coffee! - 私はコーヒーを飲む
Chao Garden: DEMO v0.6
Chao Garden V0.5b Review!
-
05-02-2006, 11:45 AM #1963QJ Gamer Green
- Registriert seit
- Nov 2005
- Ort
- Sweden
- Beiträge
- 460
- Points
- 6.520
- Level
- 52
- Downloads
- 0
- Uploads
- 0
Gutya
Yes of course, if you noticed, this is the "Lua Help Thread".[CENTER]Some of my homebrew Applications/Games:
[URL=http://forums.qj.net/showthread.php?t=47294&page=1&pp=10]Planet Fighter[/URL] | [URL=http://forums.qj.net/showthread.php?p=641672#post641672]Graphic Creator (V2.0)[/URL] | [URL=http://forums.qj.net/showthread.php?p=512717]Fire Pong[/URL] | [B][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html#post1430891"][COLOR="Red"][SIZE="3"]Brushes v2.0[/COLOR][/SIZE][/B][/URL] [URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][B][SIZE="2"][COLOR="Black"]Released![/COLOR][/SIZE][/B][/URL]
[URL="http://haxxblaster.2u.se/"][COLOR="black"][FONT="Arial Black"]www.HaxxBlaster.com[/FONT][/COLOR][/URL]
[URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][IMG]http://img19.imageshack.us/img19/1346/brushesbannerqz3.png[/IMG][/URL][/CENTER]
-
05-02-2006, 11:49 AM #1964
I was just asking, because ive never known of variables staying after youve switched off your PSP.
D:
-
05-02-2006, 12:00 PM #1965QJ Gamer Green
- Registriert seit
- Nov 2005
- Ort
- Sweden
- Beiträge
- 460
- Points
- 6.520
- Level
- 52
- Downloads
- 0
- Uploads
- 0
Do you allways gets errors about that everytime you turn on the psp while it have been turned off?
Geändert von HaxxBlaster (05-02-2006 um 12:03 PM Uhr)
[CENTER]Some of my homebrew Applications/Games:
[URL=http://forums.qj.net/showthread.php?t=47294&page=1&pp=10]Planet Fighter[/URL] | [URL=http://forums.qj.net/showthread.php?p=641672#post641672]Graphic Creator (V2.0)[/URL] | [URL=http://forums.qj.net/showthread.php?p=512717]Fire Pong[/URL] | [B][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html#post1430891"][COLOR="Red"][SIZE="3"]Brushes v2.0[/COLOR][/SIZE][/B][/URL] [URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][B][SIZE="2"][COLOR="Black"]Released![/COLOR][/SIZE][/B][/URL]
[URL="http://haxxblaster.2u.se/"][COLOR="black"][FONT="Arial Black"]www.HaxxBlaster.com[/FONT][/COLOR][/URL]
[URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][IMG]http://img19.imageshack.us/img19/1346/brushesbannerqz3.png[/IMG][/URL][/CENTER]
-
05-02-2006, 12:03 PM #1966
I'm almost positive that unless you write the variables to another file they will be cleared.
D:
-
05-02-2006, 12:05 PM #1967QJ Gamer Green
- Registriert seit
- Nov 2005
- Ort
- Sweden
- Beiträge
- 460
- Points
- 6.520
- Level
- 52
- Downloads
- 0
- Uploads
- 0
I don't mean "Restart" the PSP, read what i am writing.
[CENTER]Some of my homebrew Applications/Games:
[URL=http://forums.qj.net/showthread.php?t=47294&page=1&pp=10]Planet Fighter[/URL] | [URL=http://forums.qj.net/showthread.php?p=641672#post641672]Graphic Creator (V2.0)[/URL] | [URL=http://forums.qj.net/showthread.php?p=512717]Fire Pong[/URL] | [B][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html#post1430891"][COLOR="Red"][SIZE="3"]Brushes v2.0[/COLOR][/SIZE][/B][/URL] [URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][B][SIZE="2"][COLOR="Black"]Released![/COLOR][/SIZE][/B][/URL]
[URL="http://haxxblaster.2u.se/"][COLOR="black"][FONT="Arial Black"]www.HaxxBlaster.com[/FONT][/COLOR][/URL]
[URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][IMG]http://img19.imageshack.us/img19/1346/brushesbannerqz3.png[/IMG][/URL][/CENTER]
-
05-02-2006, 12:08 PM #1968
Your saying 'Turn off' the PSP.
D:
-
05-02-2006, 12:11 PM #1969QJ Gamer Green
- Registriert seit
- Nov 2005
- Ort
- Sweden
- Beiträge
- 460
- Points
- 6.520
- Level
- 52
- Downloads
- 0
- Uploads
- 0
Yes i did, what should i otherwise call it?
I mean the "turn off" that saves the current memory to the PSP.
Don't you find it strange that it don't find a variable that is working perfectly, then it just says it's a nil value.[CENTER]Some of my homebrew Applications/Games:
[URL=http://forums.qj.net/showthread.php?t=47294&page=1&pp=10]Planet Fighter[/URL] | [URL=http://forums.qj.net/showthread.php?p=641672#post641672]Graphic Creator (V2.0)[/URL] | [URL=http://forums.qj.net/showthread.php?p=512717]Fire Pong[/URL] | [B][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html#post1430891"][COLOR="Red"][SIZE="3"]Brushes v2.0[/COLOR][/SIZE][/B][/URL] [URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][B][SIZE="2"][COLOR="Black"]Released![/COLOR][/SIZE][/B][/URL]
[URL="http://haxxblaster.2u.se/"][COLOR="black"][FONT="Arial Black"]www.HaxxBlaster.com[/FONT][/COLOR][/URL]
[URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][IMG]http://img19.imageshack.us/img19/1346/brushesbannerqz3.png[/IMG][/URL][/CENTER]
-
05-02-2006, 12:30 PM #1970<img src="images/smilies/psp.gif" border="0" alt="" title="" cl***="inlineimg" /> <img src="images/smilies/Punk.gif" border="0" alt="" title="" cl***=&

- Registriert seit
- Jun 2005
- Ort
- Canada
- Beiträge
- 1.944
- Points
- 11.105
- Level
- 69
- Downloads
- 0
- Uploads
- 0
do you mean 'sleep mode'?
-
05-02-2006, 12:35 PM #1971QJ Gamer Green
- Registriert seit
- Nov 2005
- Ort
- Sweden
- Beiträge
- 460
- Points
- 6.520
- Level
- 52
- Downloads
- 0
- Uploads
- 0
Yes i mean sleepmode, i totally forgot that.
Do you know how to solve my problem?
I have got that error some times before, but i don't know how i solved them.[CENTER]Some of my homebrew Applications/Games:
[URL=http://forums.qj.net/showthread.php?t=47294&page=1&pp=10]Planet Fighter[/URL] | [URL=http://forums.qj.net/showthread.php?p=641672#post641672]Graphic Creator (V2.0)[/URL] | [URL=http://forums.qj.net/showthread.php?p=512717]Fire Pong[/URL] | [B][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html#post1430891"][COLOR="Red"][SIZE="3"]Brushes v2.0[/COLOR][/SIZE][/B][/URL] [URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][B][SIZE="2"][COLOR="Black"]Released![/COLOR][/SIZE][/B][/URL]
[URL="http://haxxblaster.2u.se/"][COLOR="black"][FONT="Arial Black"]www.HaxxBlaster.com[/FONT][/COLOR][/URL]
[URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][IMG]http://img19.imageshack.us/img19/1346/brushesbannerqz3.png[/IMG][/URL][/CENTER]
-
05-02-2006, 12:49 PM #1972QJ Gamer Silver
- Registriert seit
- Jun 2005
- Ort
- The Migrant Fleet
- Beiträge
- 908
- Points
- 9.678
- Level
- 66
- Downloads
- 0
- Uploads
- 0
what does this mean.. i got a stackdump file..
Code:Exception: STATUS_ACCESS_VIOLATION at eip=610028AA eax=00000000 ebx=61258EB0 ecx=00000016 edx=000001A0 esi=000001A0 edi=61259000 ebp=07ADEA58 esp=07ADEA20 program=C:\Documents and Settings\Kyle\Desktop\luaplayerwindows-0.14\luaplayerwindows\luaplayer.exe, pid 5844, thread unknown (0x72C) cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023 Stack trace: Frame Function Args 07ADEA58 610028AA (005C0073, 006F0074, 0074002E, 00740078) 07ADEA88 61011784 (07ADEAB0, 7C9143A1, 00000000, 007C6F1C) 07ADEC28 61011A28 (1007EB98, 00000000, 00000001, 00000000) 07ADEC88 6108FBEC (1007EB98, 00000000, 000001B6, 10079410) 07ADECA8 610DC8D6 (07ADF144, 1007EB98, 00000000, 000001B6) 07ADECD8 610CC367 (07ADF144, 1007EB98, 10079410, 1007F9F0) 07ADECF8 610CC461 (1007EB98, 10079410, 00000000, 00000000) 07ADED28 610844FF (10075338, 1007EA78, 10075338, 10075690) 07ADED78 00410F94 (10075338, 1007F9D8, 1007F540, 1007F9D8) 07ADEDF8 00415E17 (10075338, 10075530, 65736F6C, 10075430) 07ADEE18 00411453 (10075338, 10075530, FFFFFFFF, 610846EE) 07ADEE38 0040F7E1 (10075338, 07ADEF88, 3C203420, 3434203D) 07ADEF38 00410C08 (10075338, 0040F7C0, 07ADEF88, 00000000) 07ADEF68 0041176E (10075338, 0040F7C0, 07ADEF88, 00000100) 07ADEF98 0040F849 (10075338, 00000000, FFFFFFFF, 00000000) 07ADEFB8 004031BE (0023EF1A, 00000000, 07ADEFF8, 61003E94) End of stack trace (more stack frames may be present)
-
05-02-2006, 01:15 PM #1973
I have no idea what those thingies mean. Its not lua anyway :P.
LUA manual:
[url]http://www.lua.org/manual/5.0/manual.html[/url]
LUA Wiki:
[url]http://wiki.ps2dev.org/psp:lua_player[/url]
-
05-02-2006, 01:24 PM #1974
Deleting post.
Geändert von ZereoX (05-02-2006 um 01:33 PM Uhr)
-
05-02-2006, 01:29 PM #1975Developer

- Registriert seit
- Oct 2005
- Ort
- Boston, MA
- Beiträge
- 1.389
- Points
- 14.378
- Level
- 77
- Downloads
- 0
- Uploads
- 0
Are you using a sound file that doesnt exist? Isnt a Mono wav? or is a unusable sound file(in LUA). Is the extension of the file there when you load it? Or did you mispell the filename or the variable name when "Sound
Zitat von montrob
lay()"ing.
Those are some of th reasons for it, check through and tell me if it works.
-
05-02-2006, 01:48 PM #1976
guys, is there a button in luaplayer windows to have the same function of the buttons for the psp ? becuase this eloader 97 keep crashing with my 2.0 and i dont like the idea to downgrade though.
>.< i found the controls , but it dosent have the nub controll
:Cry:Bequiet!!!
I'm learning cc©cc
-
05-02-2006, 01:54 PM #1977Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
hi, i have a prob with my code. here it is
part of it)
and i get this error:Code:math.randomseed(os.time()) a = 0 b = 0 c = 1 d = 1 e = 1 x = 1 y = 120 x32 = x+50 y32 = y+50 x2 = math.random(1000) y2 = math.random(240) spike = {} for c = 1,10 do spike[c] = { a = math.random(100), b = math.random(100), x232 = x2+a, y232 = y2+b, pic = Image.createEmpty(a, b) } end
error: test.lua:32: Invalid Size
??? how di i fix this?? thx for all your help!!--------------------------------------------------------------------------------------
-
05-02-2006, 02:42 PM #1978QJ Gamer Silver
- Registriert seit
- Jun 2005
- Ort
- The Migrant Fleet
- Beiträge
- 908
- Points
- 9.678
- Level
- 66
- Downloads
- 0
- Uploads
- 0
i havent used a single sound in my program lol
Zitat von Vaza
-
05-02-2006, 04:14 PM #1979Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
i have another problem(yay), but i solved my other one. my currnet problem:
my collision detection wont work. here is my code:
i have defined everything. but the objects pass right through the player..Code:math.randomseed(os.time()) a = 0 b = 0 c = 1 d = 1 e = 1 f = 1 g = 1 h = 1 x = 1 y = 120 x32 = x+50 y32 = y+50 spike = {} for c = 1,10 do x2 = 0 y2 = 0 spike[c] = { a = math.random(100), b = math.random(100), x2 = math.random(2000), y2 = math.random(240), x232 = x2+a, y232 = y2+b} end for h = 1,10 do if (((x32 >= spike[h].x2) and (x <= spike[h].x232)) and ((y32 >= spike[h].y2) and (y <= spike[h].y232))) then gameover = true end end if gameover == true then break
pls help me..--------------------------------------------------------------------------------------
-
05-02-2006, 05:05 PM #1980
i think you have to do something like this
Zitat von Grimfate126
same as a arrow or an object to stop at a location, but have no idea to make it disapear after it stopsCode:if letterPosy < 2 then letterPosy = 2 end if letterPosy > 269 then letterPosy = 269 end if letterPosx < 2 then letterPosx = 2 end if letterPosx > 477 then letterPosx = 477 end
anyways
guys I have a background set up and I draw like a filled red square above it.
I want to erease half of the filled red square with an arreaser picture so one of the half of the square will be red and the other part will replease the backgroung.
not like to erease with a white color, but using the background to errease something and to look the same after erased
is it possible to do it ?Bequiet!!!
I'm learning cc©cc


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