I get the same exact error, but im using the windows lua playerZitat:
Zitat von bronxbomber92
Printable View
I get the same exact error, but im using the windows lua playerZitat:
Zitat von bronxbomber92
i cant test on my computer becuase i have a mac :(
wait, the sound loops so is that what the error means?
What are all the sound formats supported, and are there any size limits?
can any1 help me get my small app running on my psp?
Post the code and we will try and help you out
ok heres the code
green = Color.new (0, 255, 0)
Enemy = { }
Enemy[1] = { type = "gargoyle", health = 100 }
Enemy[2] = { type = "vampire", health = 100 }
Enemy[3] = { type = "goomba", health = 100 }
Enemy[4] = { type = "ghost", health = 100 }
Enemy[5] = { type = "zombie", health = 100 }
Player = { }
Player[1] = { weapon = "sword", health = 100 }
Player[2] = { weapon = "knife", health = 100 }
while true do
pad = Controls.read()
screen.clear()
screen:print(5, 10, "Player 1 Health: ".. Player[1].health,green)
screen:print(5, 20, "Player 1 Weapon: ".. Player[1].weapon,green)
screen:print(250,10,"Enem y Health: " .. Enemy[1].health,green)
screen:print(250,20,"Enem y Type: " .. Enemy[1].type,green)
if pad:cross() then
Enemy[1].health = Enemy[1].health - 5
end
screen.waitVblankStart()
screen.flip()
end
BTW- the smilies where placed in by the forum becuz but remember its really screen:print
oh, and now i get the error of index.lua:1: unexpected symbol near (sumtin, i cant type it on a keyboard)
sry for double post!!!
is this???: screen"print(5, 20, "Player 1 Weapon: ".. Player[1].weapon,green)
try: screenprint(5, 20, "Player 1 Weapon: ".. Player[1].weapon,green)
omg, i cant believe i missed that! thanks! but know i get error: index.lua:1: unexpected symbol near (little backward slash) { (little forward slash).
sry i dont now if i can type those symbols i was describing...
i guess that this is a problem with the values. mmmm im thinking..........
Zitat:
Zitat von TeamOverload
the most common are .wav, .it, .xm
if the the size of the sound is higher than 5mb the game could be slower.
correct me if im wrong.
yeah i cant find any more bugs in the code :(, i wish i could figure this out!!!
it means something is wrong in the first line of your file. Post that because green=Color.new(0,255,0) is correctZitat:
Zitat von bronxbomber92
BTW
screenprint()
should be
screen:print()
so with a ":"
aside from what yall are talking about, how would i make a small loop inside a bigger loop? So i could hit break and have my code start over from the begining.
Sorry I never checked yours. Thanks for your help. It works great.Zitat:
Zitat von c5cha7
k... umm I have a loading screen as script.lua and then dofile game.lua but the loading screen keeps looping...
Post your code and i will have a look :icon_wink .Zitat:
Zitat von MaSt3r_ShAk3
Or just try this in a while true loop>
while true do
loading=loading+1
if loading 1 > and loading < 50 then
screen:blit(0,0, loadingscreen)
end
if loading 49 > then
back to script code here
end
etc...
?? it started happening when I added collision detection (based on the tut)
how do you say does not equal in lua,,
i tried != but that doesnt work,,
~=Zitat:
Zitat von Sousanator
means not equal to.
its weird that its not !=, like every other languages i know,
oh well,
thanks though,
Umm, is there an alternative for collision other than that tutorial? it makes my loading screen loop forever...
Offtopic: ^^^ what's the story of your screen name?
Hey MaSt3r_ShAk3 whats that tutorial your talking about? Mind giving me the link?
how do i insert a pause, i have text apear but the next line of text comes to quick
Yeah i just found it myself, thx though!Zitat:
Zitat von PopcOrn DeVil
@Mori
Use screen.waitVblanck([miliseconds]) or whatever the code exactly is. Where miliseconds is the amount of miliseconds you want the pause to be.
thank you
it did not work
How do i get a background that is the size of the screen?
also how could i get it to change the pick when a button is pressed
By making it 480x272Zitat:
Zitat von Mori
something like this worksZitat:
also how could i get it to change the pick when a button is pressed
pad=Controls.read()
if pad:cross() then
screen:blit(0,0,[otherpic],0,0,otherpic:width(),oth erpic:height())
end
so would i do
Pick1 = Image.load("Pick1.png")
Pick2= Image.load("Pick2.png")
screen:blit(480, 272, Pick1, [alpha = flase])
end
pad=Controls.read()
if pad:r() then
screen:bilt(480, 272, Pick2, [alpha= false])
end
??
Almost
Pick1 = Image.load("Pick1.png")
Pick2= Image.load("Pick2.png")
screen:blit(480, 272, Pick1, [alpha = flase])
end <-- this should be gone as there is no loop or anything like that before this
pad=Controls.read()
if pad:r() then
screen:bilt(480, 272, Pick2, [alpha= false])
end
Also the screen:blit thingies should have more arguments, so like this:
screen:blit(0,0,[otherpic],0,0,otherpic:width(),oth erpic:height())
Pick1= Image.load("Pick1.png")
Pick2= Image.load(Pick2.png")
screen:bilt( 480, 272, [Pick1],480,272,Pick1:width(480) , oth erpic:hight(272))
pad=Conrols.read()
if pad.r()then
screen:bilt( 480, 272, [Pick2],480,272,Pick2:width(480) , oth erpic:hight(272))
end
Pick1= Image.load("Pick1.png")
Pick2= Image.load("Pick2.png")
screen:blit( 480, 272, Pick1,480,272,Pick1:width () , otherpic:hight())
pad=Conrols.read()
if pad.r()then
screen:blit( 480, 272, Pick2,480,272,Pick2:width () , otherpic:hight())
end
its blit instead of bilt
The "[" and "]" were to show it you should put there your own name they are not to be included
[pic]:width() and height() return the width and height of the pic so you dont need to put those between the brackets.
I cant seem to get it to work hmm let me upload my Lua
let me know if you see any thing rong
This should work (look at the things i changed, because you had some small errors but important ones):
Code:-- Rock actions
green = Color.new(255,64,64)
upPressed = 'You try to feed your rock'
downPressed = 'You pet your rock'
leftPressed = 'You Kick your Rock'
rightPressed = 'You look at your Rock'
LPressed = 'You give our rock some of its meds....'
-- you should put this before the loop otherwise it keeps on loading them.
Pick1= Image.load("Rock-1.png")
Pick2= Image.load("Rock-2.png")
-- *****Main Loop******
while true do
screen:clear()
pad = Controls.read()
if pad:down() then
screen:print(15,252,downPressed,green)
end
if pad:left() then
screen:print(15,252,leftPressed,green)
end
if pad:right() then
screen:print(15,252,rightPressed,green)
end
if pad:l() then
screen:print(15,252,LPressed,green)
end
if pad:up() then
screen:print(15,252,upPressed,green)
end
-- Rocks
screen:blit( 0, 0, Pick1,0,0,Pick1:width(), Pick1:height())
if pad.r()then
screen:blit( 0, 0, Pick2,0,0,Pick2:width(), Pick2:height())
end
screen.waitVblankStart()
screen.flip()
end
Does anybody know what the specs of an IT file should be to run properly? I have 8 bit and 12000kbit/s but only the first 30 seconds will play. Same happens with those specs on an XM file, it drives me nuts!
EDIT: ok it more tests:
It doesn't even play when its 8kHz/16kHz
Plays even shorter when its 11025Hz/22050Hz
Also plays shorter when its 16bit and 12000Hz
ty so much