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 Grimfate126 me 2! I need this too...
-
04-24-2006, 05:24 PM #1831
I need this too
Zitat von Grimfate126
-
04-24-2006, 05:56 PM #1832words 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
Depends, AI is just alot of booling really. If enemy 1 walks at the speed of 1, then enemy 2 walks at speed of 2. If enemy 1Xco-Ordiante >= player1, enemy1Shooting_Function() .
Zitat von <
^Just a HORRIBLE example lo. But you get the point. Maybe ill post a quick tut for easy AI waling around.
Its proabbly the funnesyt, and hardest part of coding.

...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
-
04-24-2006, 06:03 PM #1833
Thanks an AI tutorial would be nice
-
04-24-2006, 07:18 PM #1834
guys i kinda forgot this but can anyone remember me how to make the hello appear and stay only when i pres X
this is to make it appear while holding cross, what do i change to appear the hello and make it say after i release cross button?Code:blue=Color.new(0,200,350) while true do screen:clear() pad = Controls.read() if pad:cross() then screen:print(200, 70, "Hello!", blue) end if pad:select() then break end screen.waitVblankStart() screen.flip() end
Bequiet!!!
I'm learning cc©cc
-
04-24-2006, 10:01 PM #1835words 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
ok, ill probably make a basic AI tutorial in LUA, but i dunno if my syntax will be right, so I may do it in C and convert it, but i dunno stilll. What kind of AI are you looking for? Aimlessly walking around AI? If the enemy is looking toward your direction have him fire or what? ya know, just look at a pong exmaple i guess. But AI isnt really tat hard, its just alot of bools/if statements.
Now, this is a pathetic atempt to give you all a general idea of AI. Since my LUA is rusty, bare with me. This is an exmaple of using bools and if statements to make a simple player1 and enemyAI interaction.Code:AIenemy = Image.load("AIenemy.png") --Line 1 Player1 = Image.load("Player1.png") -- Line 2 AIenemyX = 1 --3 AIenemyY = 240 --4 Player1x = 440 --5 Player1y = 240 --6 AIenemyWalking = 3 --7 AIenemyCharging = 7 --8 Seen_distance = 125 --9 Seen_flag=false --10 while true do --11 screen:blit(blit Player1 to co-ordinates Player1x & y) -- 12 screen:blit(blit AIenemy to co-ordinates AienemyX & Y) --13 if AIenemyX>Player1x-Seen_distance and AIenemyX<Player1x then Seen_flag=true --14 else if AIenemyX<Player1x-Seen_distance then Seen_flag=false --15 else if AIenemyX==Player1x then Seen_flag=NULL --16 elseif Seen_flag==false then AIenemyX=AIenemyX+AIenemyWalking --17 else if Seen_flag==true then AIenemyX=AIenemyX+AIenemyCharging --18 else if Seen_flag==NULL then --19 AIenemyX=AIenemyX+0 --20 screen: print(10, 10, "The Enemy has Charged and hit you Player1!", Color.new(120, 120, 120)) --21 end --22 end --23
- Load our Enemy Image to put AI on
- Load our player1 Image to get abused by AI
- Define the Enemy's X Co-Ordinate
- Define the Enemy's Y Co-ordinate
- Define the Player1;s X Co-Ordinate
- Define the Player1's Y Co-Ordinate
- Define the Enemy's Walking Speed (3)
- Define the Enemy's Charging/Running Speed (7)
- Define the Enemy's Sight Distance
- Create a 'flag' to indicate what our Enemy's AI state is at
- While 1 = true, keep looping, and 1 = true, so infinte loop
- Blit the Player1 Image to the Co-Ordinates: (Player1x, Player1y)
- Blit the Enemy Image to the Co-ordianates: (AIenemyX, AIenemyY)
- Specify that if the Enemy's X co-ordinate gets too close to player1's X co-ordinate, by the Seen_distance integer, then change the Seen_flag from false, meaning no it cant see the player, to true, it can see it. please note how i put an extra 'and' statement in there. This is to say that while the Enemy is within the pixel range of 1 - 125 of Player1, he'll charge. the Pixel range shouldnt be 0-125, or else the Seen_flag will both = NULL and true, thus causing an exception handler (in C). Thats becasue Player1x and the range 0-125 have Player1x's value in there. That is the 0 pixel distance from the Enemy.
- ^ Complete opposite, if the Enemy's X co-ordinate is farther then its sight of view, Seen_distance, then the Seen_flag is false, since it cannot see it, thus setting up for the effect, now that we have a trigger.
- This is saying that if the Enemy's X Co-ord matches Player1's, then the Seen_flag=NULL. this is just used to link towards an effect, now that its a trigger. You can rename NULL, to collision_encountered, or w/e.
- Now that we have our triggers linked to the correct 'variable', lets substitue those variables with effects/actions shall we? this line here is saying that if our 'Seen_flag' flag/variable is triggered to = true, then the Enemy can see Player1, and will now start charging by changing the X increase speed to 7 (AIenemyCharging) from 3 (AIenemyWalking).
- ^ Opposite of above. if our 'Seen_flag' flag is linked/changed to 'false' then the Enemy cannot see player1, therefore he is not running, maintaining his walking speed (3).
- This is the 'collision' effect. It is very crappy for i am too lazy to re-convert my C collision to LUA for a simple tut. This means if our 'Seen_flag' flag is triggered towards/to NULL, then we know the Enemy and Player1 have collided.
- Therefore we dont want the Enemy to keep running by, we want him to stop/halt. That is why the running speed of the Enemy = 0, so he stops. P.S. i would have included the AIenemyHalt variable for when collided, but i do not want to re-order this list to accomadate to the small change in 1 line

- Now we can add a little more touch to our game demo type thing. When collided, it will print to the screen "The Enemy has Charged and hit you Player1!" Since well, this is true cause the enemy did collide with Player1, so it shall print the truth :mrgreen:
- Now Simply Close your only 'if' statement that actually needs you to close it. ('elseif' has an end built in)
- now just Close our infinite loop and walaa
Hope this helps somebody! Now you cna look at Halo 2 and be like... That hunter saw me from an X co-ordinate of 'insert#here' Thats cause Bungie has somewhat of the same concept of this tut. (P.S. That is not including the Y and Z co-ordinates also when detecting presense of a player via AI)
~SG57
...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
-
04-25-2006, 02:13 PM #1836
help me pls.
I want to make my program to change to the 2nd background when I select "Click Here to Start" with the arrow and press start. the code bellow gives error =/Code:screen:print(200, 136, "Click Here to Start", red) if pad:start() then letterPosx >= 200 and letterPosx <= 220 and letterPosy >= 136 and letterPosy <= 150 = screen:blit(0,0, blank) end
can somebody help?
and also, how can i make the arrow that i m controlling with nub stop moving at certain point, becuase so it will freeze when it tryies to get out of the screenGeändert von natan333 (04-25-2006 um 02:21 PM Uhr)
Bequiet!!!
I'm learning cc©cc
-
04-25-2006, 02:54 PM #1837
all you need to do is change if pad:starts()... to
if pad:start() and letterposx >=200 and letterPosx <= 220 and letterPosy >= 136 and letterposy <= 150 then
screen:blit(0, 0, blank)
end
-
04-25-2006, 04:02 PM #1838<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
can you rotate/flip images or text in lua?
oh, and good mini AI tut SG57
-
04-25-2006, 04:28 PM #1839
dint work, it gave me an error when i press start
Zitat von brtn_cruzer
anyways, if "if pad:start() then screen:blit(0,0, blank)
end" make the screen blank with an image while holding start, how can i make it blank pressing start only 1 time ?Bequiet!!!
I'm learning cc©cc
-
04-25-2006, 05:28 PM #1840QJ Gamer Silver
- Registriert seit
- Jun 2005
- Ort
- The Migrant Fleet
- Beiträge
- 908
- Points
- 9.678
- Level
- 66
- Downloads
- 0
- Uploads
- 0
umm what does this error mean?
Code:method must be called with a colon!
-
04-25-2006, 05:41 PM #1841QJ Gamer Green
- Registriert seit
- Jul 2005
- Ort
- Michigan
- Beiträge
- 104
- Points
- 5.046
- Level
- 45
- Downloads
- 0
- Uploads
- 0
It means that the method you called should use a colon instead of a dot. For instance:
Zitat von montrob
as opposed toCode:screen:print(x, y, string, color)
Code:screen.print(x, y, string, color)
[QUOTE=Gutya]I think it's getting a bit stupid people posting 'I don't know' or 'I've never messed with that before', it's a waste of time. It's like buzzing in on a quizshow only to say 'I dunno...'.[/QUOTE]
-
04-25-2006, 06:12 PM #1842
guys whats wrong with this ???
is this supposed to work?? I looked at a sourceCode:tittle = Image.load("title.png") while true do screen:clear() pad = Controls.read() screen:blit(0,0, tittle) if pad:start() then playergame1() end if pad:select() then break end screen.flip() screen.waitVblankStart() end arrow = Image.load("arrow2.png") blank = Image.load("blank.png") letterPos = {} letterPosx = 200 letterPosy = 150 function playergame1() while true do screen:clear() pad = Controls.read() screen:blit(letterPosx,letterPosy, arrow) screen:blit(0,0, blank) if pad:select() then break end screen.flip() screen.waitVblankStart() end end
I think i put the function or the pad start function wrong. can someone correct me pls
~EDIT~ aaa never mind, i just changed the 1st background to be last and it worked :icon_bigg
anyways , can someone tell how to make a moving arrow to not bypass the screen?Geändert von natan333 (04-25-2006 um 06:19 PM Uhr)
Bequiet!!!
I'm learning cc©cc
-
04-25-2006, 10:40 PM #1843words 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
? Moving arrow to not bypass the screen?
If you mean boundaries, then there simple.
There are multiple ways to do this. I just gave a quikc wexmaple to help u. (Since well, trying to contribute to the scene as much as i can since once Sony has all the next big things out for the firmware, im upgrading :-( } Now, all you really have to change to use this for your own is replace the CursorsDimensionX wth your cursors X dimension (width), replace the CursorsDimensionY with your cursors Y dimension (height). Along with what your image of the cursor is actually called, where to load it from, etc. You may also manipulate the CursorMovementSpeed integer to your liking since that is how 'sensitive' your cursor will be. 5 is a decent value. You may also in later games or something, instead of a cursor, replace it with a rock or a shot, and have instaed of it stopping aafter offsecreen, but have it return back to the opposite side of what screen it is on to have it keep playing.Code:Cursor = Image.load("cursor.png") CursorX=240 CursorY = 136 CursorMovementSpeed = 5 CursorsDimensionY = 0 --for this ex CursorsDimensionX = 0 --for this ex while true do input = Controls.read() blit:Cursor(blit the Cursor image to (CursorX, CursorY)with dimensions (CursorsDimensionX, CursorsDimensionY)) if input:up() then CursorY = CursorY - CursorMovementSpeed else if input:down() then CursorY = CursorY + CursorMovementSpeed else if input:left() then CursorX = CursorX - CursorMovementSpeed else if input:right() then CursorX = CursorX + CursorMovementSpeed else if CursorY<0 then CursorY = 0 else if CursorY>272-CursorsDeimensionY then CursorY = 272-CursorsDeimensionY else if CursorX<0 then CursorX = 0 else if CursorX>480-CursorsDimensionX then 480-CursorsDimensionX end end
Just a quick newbies help tut there.
:humped: I couldnt make it too advanced. Or else it would confuse new people. But seriously, you/I can make 'some serious stuff happen if you know what your doing :Punk:
Zitat von Sousanator
P.S. 4 more days of finals left! w00t w00t, then i can start coding again to finish some of my projects up.Geändert von SG57 (04-25-2006 um 10:44 PM Uhr)

...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
-
04-26-2006, 03:16 AM #1844
thx.... when i get back from school and i understand it and how it works, my portable paint is almost ready for its 1st verson
:icon_smilBequiet!!!
I'm learning cc©cc
-
04-26-2006, 01:22 PM #1845
guys what is the code that if i press start, it will reset the function ? so it starts all over again with a new blank background if it have something before
Geändert von natan333 (04-26-2006 um 01:31 PM Uhr)
Bequiet!!!
I'm learning cc©cc
-
04-26-2006, 05:55 PM #1846words 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
uhh... a paint program probably meaning you 'created' a blank image with its dimensions, so just use a clear image type prototype and insert your image there.
but if your wondering for resseting a function, I thionkyou mean like running it again, which you just call, if pad:start() then reset_function_goes_here( ) end
...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
-
04-26-2006, 06:01 PM #1847Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
hey SG57, this is oftopic, but are u still workin on that kitten cannon game?
Zitat von SG57
--------------------------------------------------------------------------------------
-
04-26-2006, 07:15 PM #1848
SG57 are you sure thats the right formula ?
becuase it gives me error thoughBequiet!!!
I'm learning cc©cc
-
04-26-2006, 07:34 PM #1849
the reset and the function dint work with me but i tryed a thing that worked
Zitat von SG57
put canvas = Image.load("blank.png")
screen:clear()
before while true do and then
if pad:start() then [Function()] endBequiet!!!
I'm learning cc©cc
-
04-26-2006, 08:16 PM #1850
I looked at some threads about if there is a way to make lua into an eboot but got confused. one sais that lua can be into a eboot and anothe guy said it cant
Is it possible or no ?
if it is . can you help me ?Bequiet!!!
I'm learning cc©cc
-
04-26-2006, 09:45 PM #1851words 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
Yes there is a way, what do you think LUA Player is? Its a luaplayer ELF file, told to load the system.lua file with the luaplayer.elf in the Eboot. Meaning, either get the LUA Player Source and change it from loading system.lua to yours. Then just complie it up and your set, but you need the envirorment set up. Or just take the Lua Windows eboot, and swap the lua script with yours, and edit the % folder eboot to your liking, meaning image, sound, etc.

...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
-
04-27-2006, 05:31 AM #1852QJ Gamer Green
- Registriert seit
- Nov 2005
- Ort
- Sweden
- Beiträge
- 460
- Points
- 6.520
- Level
- 52
- Downloads
- 0
- Uploads
- 0
What the heck is wrong with my code?!
It says that file is a nil value when i trying to write, but it's not!
It wrote the file before, but i changed a thing that shouldent matter at all.
Then it don't reads from "text.txt".
Please help me out!
Code:----Write FUNCTION function Write(filename,variabel) file = io.open(filename,"w") file:write(variabel) file:close() end ----Read FUNCTION function Read(filename,variabel) file = io.open(filename,"r") variabel = file:read() file:close() end ----Write if pad:square() then Write("text.txt",Name) end ----Read if pad:cross() then Read("text.txt",Name) end[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]
-
04-27-2006, 07:08 AM #1853words 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 think i know your problem. Your trying to write/read strings from/to a file. Well I belive you have to put " " around the string you plan on writing, or the text your writng to the file in lamen terms. Like when using screen: print(), you put the words/text in " ". screen: print("Hello"). This may be the problem because in C, you cant just write to a file the words Hello World as plain as that. You must either have a buffer for the string to be held in, or just write it out without using any variables that are being chagned alot.
fwrite(FILE*, Hello World); // <------DOESNT WORK
fwrite(FILE*, "Hello World"); // <-----DOES WORK
If my structure of the fwrite function is correct, then ya, that will work^.
Basically, I dont know if LUA does this or not, but I think you have to either have a buffer/array with the text you want/string in it, then write that to a file.
Oh and your having a problem with reading from afile. Your problem is probably that the 'variabel' thing that you replace, is not a buffer, or an array.
So to fix that problem, try making the word Name, a character array.
Name[]="" --Not sure you need these...
maybe you could do this without a problem?
Name[255]
Im not sure if LUA uses allocating memory... But w/e, maybe. Thats what the 255 is for, that means that this Name buffer can hold up to 255 bytes/characters. (I believe characters, Im not 100% sures ince its in the morning)
Then go and do your read function. This should, in your functions process, when callin variabel = file:read(), your actually going to be calling, if using Name array/buffer, Name = file:read(). That will put whatever is in the file your reading from, into the Name array/buffer, and its ready to be printed to the screen, edited, copied, etc.
I dont think any of this helps since Im not frequently coding in LUA, but maybe, tell me if so.Geändert von SG57 (04-27-2006 um 07:11 AM Uhr)

...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
-
04-27-2006, 07:22 AM #1854QJ Gamer Green
- Registriert seit
- Nov 2005
- Ort
- Sweden
- Beiträge
- 460
- Points
- 6.520
- Level
- 52
- Downloads
- 0
- Uploads
- 0
I got the writing fully working now but I
still can't get it read at all.Geändert von HaxxBlaster (04-27-2006 um 11:05 AM 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]
-
04-27-2006, 03:58 PM #1855words 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
What is the Name thing your using, is it a variable? when reading from a file, feeed what you read into an array/buffer. meaning make name, Name[255]
See what happens, or just tell me what Name is.
...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
-
04-27-2006, 05:32 PM #1856
Zitat von SG57
dint understand nothing what to do. if you make a tutorial. that will be really nice
but though, it gives a error when i try to make an eboot with luaplayer sourceGeändert von natan333 (04-27-2006 um 05:36 PM Uhr)
Bequiet!!!
I'm learning cc©cc
-
04-27-2006, 05:36 PM #1857
- Registriert seit
- Apr 2006
- Ort
- Upland, California
- Beiträge
- 89
- Points
- 4.419
- Level
- 42
- Downloads
- 0
- Uploads
- 0
help
in my game i am try ing to load numbered images
heres my code:
Code:for a = 1,1362 do local a image[a]=Image.load("image"..a".jpeg") end
-
04-27-2006, 08:00 PM #1858words 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
And are you getting an error? Cause i think your missing something in there too. Arrays count0 as a place holder, so set a = 0 if your having trouble blitting thos images or w/e.
Unless the LUA for do loop cannot have anything other than 1 there, since it increases by that number or something? I dunno, not really frequent i n LUA.
Ok, go and download hte app PSP Windows, its in LUA. Take the EBOOT, and rename your script to matach theres and the structure of where it is and such. Then just use kxploit to make an icon thing, then edit its picture and junk.
Zitat von natan333

...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
-
04-28-2006, 03:06 AM #1859QJ Gamer Green
- Registriert seit
- Nov 2005
- Ort
- Sweden
- Beiträge
- 460
- Points
- 6.520
- Level
- 52
- Downloads
- 0
- Uploads
- 0
The variable "Name" is just a simple string like this:
Code:Name = "Text"
[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]
-
04-28-2006, 12:44 PM #1860QJ Gamer Gold
- Registriert seit
- Mar 2006
- Ort
- LOLWUT
- Beiträge
- 2.625
- Points
- 18.627
- Level
- 86
- Downloads
- 0
- Uploads
- 0
Hello all, can someone help me with this code? For some reason, when I try to run it on the PC, it creates a luaplayer.exe.stackdump file. The code:
When the stackdump is opened with notepad, its:Code:red=Color.new(255,0,0) green=Color.new(0,255,0) blue=Color.new(0,0,255) white=Color.new(255,255,255) duh=Image.load("duh.png") counter=Timer.new() counter:start() screen:blit(50,50,"duh.png") while true do pad=Controls.read() if pad:up() then duh.y=duh.y + 2 end if pad:down() then duh.y=duh.y - 2 end if pad:right() then duh.x=duh.x + 2 end if pad:left() then duh.x=duh.x - 2 end currentTime=counter:time() screen:clear(blue) screen:print(10,10,"Counter Time: " .. currentTime, white) if currentTime > 2500 and currentTime < 5000 then screen:clear(red) end if currentTime > 5001 then counter:reset(0) counter:start() end screen.waitVblankStart() screen.flip() end
Can someone help? And thanks in advance!Code:Stack trace: Frame Function Args 49774 [sig] luaplayer 2112 handle_threadlist_exception: handle_threadlist_exception called with threadlist_ix -1 75965 [sig] luaplayer 2112 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION Exception: STATUS_ACCESS_VIOLATION at eip=61015E82 eax=7C802542 ebx=610E7ECC ecx=00000000 edx=0000001B esi=00000000 edi=00000001 ebp=00A2E6E8 esp=00A2E6E4 program=C:\Documents and Settings\FattyMcFat\Desktop\luaplayerwindows\luaplayer.exe, pid 2112, thread sig cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023 Stack trace: Frame Function Args 00A2E6E8 61015E82 (610E7ECC, 0022E598, 00000001, 00000000) 00A2E708 61015FAC (00000001, 00A2E760, 00000000, 00000000) 00A2EA58 610179AB (000006F4, 00A2EED0, 000000A4, 00A2EE9C) 00A2EF98 6108A497 (610E6D18, 00000000, 00000F84, 00000000) 00A2EFC8 6100327F (610E6D18, 00A2F000, 61003160, 00000000) 00A2EFF8 61003E94 (00000000, 00000000, 00000000, 00000000) 00A2FF98 61003EDA (00000000, 00000000, 00000000, 00000000) End of stack trace


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