whats the error?
Printable View
whats the error?
Hi guys. i just stared messing up with lua yesturday night
and i m starting to love this
I have a question though
To make the word blink again and again nonstop i have to copy screen.waitVblankStart(50 )Code:blue = Color.new(0 , 153, 255)
screen.waitVblankStart(50)
screen:print(200, 100, "Hello!", blue)
screen.flip(0)
screen.waitVblankStart(50)
screen.flip(0)
screen.waitVblankStart(50)
screen.flip(0)
screen.waitVblankStart(50)
screen.flip(0)
screen.waitVblankStart(50)
screen.flip(0)
screen.waitVblankStart(50)
screen.flip(0)
screen.waitVblankStart(50)
screen.flip(0)
while true do
screen.waitVblankStart()
end
screen.flip(0)
and make a long list ?? or is there is a code to make it repeat blinking for ever?
I also have some questions
there is a site that i got here from sam that have codes like this for an example but cant figure out
http://wiki.ps2dev.org/psp:lua_player:functions is the site
Code:Font Font:setCharSize(number width, number height, number dpiX, number dpiY)
where do i put the numbers ? please post an example with the numbers filled in so i can learnCode:image:clear([color = transparent-black])
Thanks!
That should work.Code:blue=Color.new(0,153,225)
while true do
screen:clear()
for i=1,50 do
if i=1 and blit=false then
blit=true
end
if i=1 and blit=true then
blit=false
end
if blit then
screen:print(200, 100, "Hello!", blue)
end
end
screen.flip()
screen.waitVblankStart()
end
hmm the end and the spaces confuse me becuase i just started this
and the site that i put below explain what the codes do but i think it dosent have all the codes for me to learn :(
i will try to understand
im not exactly sure what your error was but after messing with it for a minute or two i got it to display the images when u move the dpad. im not sure if this is what u want however. Also I changed some of the picture names(the ones it loads not the variables) because i didnt have your pictures. I also have a background image added which is just a white pictureZitat:
Zitat von siqq
Code:--Basic Variables
white = Color.new(255,255,255)
titlePlay = Image.load("Ball.png")
titleInfo = Image.load("PlayerRight.png")
titleExit = Image.load("PlayerLeft.png")
titleNumber = 1
background = Image.load("background.PNG")
function mainMenu()
if titleNumber == 1 then
screen:blit(0,0,titlePlay )
end
if titleNumber == 2 then
screen:blit(0,0,titleInfo )
end
if titleNumber == 3 then
screen:blit(0,0,titleExit )
end
if titleNumber < 1 or titleNumber > 3 then
screen:print(0,0,"error in titleNumber", white)
end
end
while true do
screen:clear()
screen:blit(0, 0, background, false)
pad = Controls.read()
if pad:start() then
break
end
--Main Menu D-Pad Controls
if pad:right() and titleNumber < 3 then
titleNumber = titleNumber + 1
mainMenu()
end
if pad:left() and titleNumber > 1 then
titleNumber = titleNumber - 1
mainMenu()
end
screen.flip()
end
testing...
[edit]I think it will work BUT...
in lua player for windows how do you move the d pad? ive tried all arrows and pressed like every button but it does nothing. i thought it was the arrows but i guess not.[/edit]
nathan42100 i tryed the code , dint work . the window shuts down after 0.5 seconds
i havent used lua player windows in a while but im pretty sure its the arrow keys. also the images will flash real7y quick
What does this code mean ?Code:for i=1,50 do
if i=1 and blit=false then blit=true end
if i=1 and blit=true then blit=false end if blit then
i think this is not correct becuase i deleted the spaces to no make me crazy
why wont they stay?Zitat:
Zitat von soadnation
[edit]and i dont think its working at all cause when i press start to break the program it does nothing as well[/edit]