have u tried this on a PSP yet because it doesnt work on the Lua Player for Windows
Printable View
have u tried this on a PSP yet because it doesnt work on the Lua Player for Windows
worked on my psp
make sure you save it as index.lua if your using LUA player with a lowser
and did you take out the spaces that the forum makes? like between numbers and stuff?
spaces? which ones
Code:yellow = Color.new(255, 255, 0)
blue = Color.new(0, 0, 255)
orange = Color.new(223, 88, 6)
grey = Color.new(94, 97, 111)
black = Color.new(0, 0, 0)
MAKE SURE THERES NO SPACES IN THE COLOR VALUE NUMBERS
background = Image.load("background.png")
screen:blit(0, 0, background, false)
screen.flip()
screen.waitVblankStart(12 0)AND IN PLACES LIKE HERE IN BETWEEN TEH 12 AND 0
screen:blit(0, 0, background, false)
screen:print(150, 130, "Welcome To pspBaller Beta!", blue)
screen.flip()
screen.waitVblankStart(18 0) HERE
screen:blit(0, 0, background, false)
screen:print(40, 150, "Thank you for waiting, now Press X for Tutorial", blue)
screen.flip()
screen.waitVblankStart(12 0) HERE
pad = Controls.read()
if pad:cross() then
screen:blit(0, 0, background, false)
screen:print(40, 150, "Welcome to the Tutorial For pspBaller", blue)
screen.flip()
screen.waitVblankStart(40 0) HERE
end
AND CHECK FOR RANY OTHER SPACES YOU MIGHT SEE
anyone know what might be wrong with this code?
its supposed to be a tic-tac-toe program with different features.
one problem is that it doesnt start, and I dont know where yall get those errors, whenever a program doesnt run on my psp it just doesnt do anything.
help please
Code:background = Image.load("background.png")
white = Image.load("white.png")
black = Image.load("black.png")
cursor = Image.load("cursor.png")
cursorx = 247
cursory = 123
screen:blit(0, 0, background, false)
screen:blit(247, 123, cursor)
screen.flip()
while true do
screen.waitVblankStart()
function white1()
screen:blit(305, 31, white)
screen.flip()
screen.waitVblankStart()
end
function white2()
screen:blit(305, 120, white)
screen.flip()
screen.waitVblankStart()
end
function white3()
screen:blit(305, 211, white)
screen.flip()
screen.waitVblankStart()
end
function white4()
screen:blit(217, 32, white)
screen.flip()
screen.waitVblankStart()
end
function white5()
screen:blit(217, 117, white)
screen.flip()
screen.waitVblankStart()
end
function white6()
screen:blit(217, 203, white)
screen.flip()
screen.waitVblankStart()
end
function white7()
screen:blit(134, 31, white)
screen.flip()
screen.waitVblankStart()
emd
function white8()
screen:blit(134, 117, white)
screen.flip()
screen.waitVblankStart()
end
function white9()
screen:blit(134, 208, white)
screen.flip()
screen.waitVblankStart()
function black1()
screen:blit(305, 31, black)
screen.flip()
screen.waitVblankStart()
end
function black2()
screen:blit(305, 120, black)
screen.flip()
screen.waitVblankStart()
end
function black3()
screen:blit(305, 211, black)
screen.flip()
screen.waitVblankStart()
end
function black4()
screen:blit(217, 32, black)
screen.flip()
screen.waitVblankStart()
end
function black5()
screen:blit(217, 117, black)
screen.flip()
screen.waitVblankStart()
end
function black6()
screen:blit(217, 203, black)
screen.flip()
screen.waitVblankStart()
end
function black7()
screen:blit(134, 31, black)
screen.flip()
screen.waitVblankStart()
emd
function black8()
screen:blit(134, 117, black)
screen.flip()
screen.waitVblankStart()
end
function black9()
screen:blit(134, 208, black)
screen.flip()
screen.waitVblankStart()
pad = Controls.read()
if pad:left() then
cursorx = cursorx - 85
end
if pad:right() then
cursorx = cursorx + 85
end
if pad:up() then
cursory = cursory + 76
end
if pad:down() then
cursory = cursory - 76
end
if pad:square() then
cursorx = cursorx - 85
end
if pad:circle() then
cursorx = cursorx + 85
end
if pad:triangle() then
cursory = cursory + 76
end
if pad:cross() then
cursory = cursory - 76
end
if cursorx > 296 then
if cursorx < 361 then
if cursory > 12 then
if cursory < 81 then
if pad:l() then
white1()
end
if cursorx > 296 then
if cursorx < 361 then
if cursory > 92 then
if cursory < 175 then
if pad:l() then
white2()
end
if cursorx > 296 then
if cursorx < 361 then
if cursory > 185 then
if cursory < 259 then
if pad:l() then
white3()
end
if cursorx > 205 then
if cursorx < 284 then
if cursory > 12 then
if cursory < 81 then
if pad:l() then
white4()
end
if cursorx > 205 then
if cursorx < 284 then
if cursory > 92 then
if cursory < 175 then
if pad:l() then
white5()
end
if cursorx > 205 then
if cursorx < 284 then
if cursory > 186 then
if cursory < 258 then
if pad:l() then
white6()
end
if cursorx > 128 then
if cursorx < 193 then
if cursory > 12 then
if cursory < 81 then
if pad:l() then
white7()
end
if cursorx > 128 then
if cursorx < 193 then
if cursory > 92 then
if cursory < 175 then
if pad:l() then
white8()
end
if cursorx > 128 then
if cursorx < 193 then
if cursory > 186 then
if cursory < 258 then
if pad:l() then
white9()
end
if cursorx > 296 then
if cursorx < 361 then
if cursory > 12 then
if cursory < 81 then
if pad:r() then
black1()
end
if cursorx > 296 then
if cursorx < 361 then
if cursory > 92 then
if cursory < 175 then
if pad:r() then
black2()
end
if cursorx > 296 then
if cursorx < 361 then
if cursory > 185 then
if cursory < 259 then
if pad:r() then
black3()
end
if cursorx > 205 then
if cursorx < 284 then
if cursory > 12 then
if cursory < 81 then
if pad:r() then
black4()
end
if cursorx > 205 then
if cursorx < 284 then
if cursory > 92 then
if cursory < 175 then
if pad:r() then
black5()
end
if cursorx > 205 then
if cursorx < 284 then
if cursory > 186 then
if cursory < 258 then
if pad:r() then
black6()
end
if cursorx > 128 then
if cursorx < 193 then
if cursory > 12 then
if cursory < 81 then
if pad:r() then
black7()
end
if cursorx > 128 then
if cursorx < 193 then
if cursory > 92 then
if cursory < 175 then
if pad:r() then
black8()
end
if cursorx > 128 then
if cursorx < 193 then
if cursory > 186 then
if cursory < 258 then
if pad:r() then
black9()
end
what's the code supposed to do?
I have two questions. I want to start programing in lua so I decided to start on a simple program. How exactly do I make a menu and how do I tell the program to do a math problem?
hmm im gettinga Weird Error when i try to Use Lua for Windows to Run pspBaller when i ran some code, it says "error: script.lua:52: no loop near 'end" here is the code by endCode:if pad:select() then screen:save("screenshot.tga") end
if pad:start() then
break
end
end
You have an extra end at the end of it. If it is ending a loop, then thats a different story. If you intend to loop it, then make sure there is a loop to start it off.Zitat:
Zitat von KINGOFNOOBS
hmm how would u make it to make it so when u press lets say, Right on the PSP Pad it moves a Object, and how would u make it so u could control how much it moves, and also how would it know what object move?