code
red = Color.new(255,0,0)
black = Color.new(0,0,0)
white = Color.new(255,255,255)
menustatus = 1
while true do
screen:clear(black)
pad = Controls.read()
end
if pad:up() then
menustatus = menustatus - 1
screen.waitVblankStart(4)
end
if pad:down() then
menustatus = menustatus + 1
screen.waitVblankStart(4)
end
color={white, white, white}
screen:print(50, 50, "Play", color[1])
screen:print(50,60,"Options", color[2])
screen:print(50,70,"Exit", color[3])
color[menustatus]=red
if menustatus == 1 then
if pad:cross() then
dofile("Game.lua")
if menustatus == 2 then
if pad:cross() then
--insert options here
end
end
if menustatus == 3 then
if pad:cross() then
while true do
break
end
end
if menustatus <= 0 then
menustatus = 3
end
if menustatus >= 4 then
menustatus = 1
end
screen.flip()
screen.waitVblankStart()
end
end
Error: index.lua :58: 'end' expected (to close 'if' at line 30)
Started by dragonxtamer596, Oct 21 2012 01:44 AM
5 replies to this topic
#1
Posted 21 October 2012 - 01:44 AM
#2
Posted 21 October 2012 - 02:23 AM
Could you post a description of your problem? Or at least add some [code] tags
#3
Posted 21 October 2012 - 02:27 AM
Best I can say is that this line
if menustatus == 1 then
if pad:cross() then
dofile("Game.lua")
Is missing 2 ends
if menustatus == 1 then
if pad:cross() then
dofile("Game.lua")
Is missing 2 ends
#5
Posted 21 October 2012 - 03:26 AM
"while true do break end"...What? It's like you wrote that just to annoy me.
#6
Posted 21 October 2012 - 10:27 AM
You're trying to run code made for LuaPlayer on the PSP without alteration. That isn't going to work. Even if you fix your syntax errors it isn't going to work.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












