Lua Error which i cant fix...

Hey guys ,

i have got that error:

[string "?"]:33: attempt to index local ´text´ (a number value)

what does that mean ?

 

Here is my code:

blue = Color.new(56,172,236)
itemlist = 0
startbox = Image.load("startbox.png") 
selector = Image.load("selector.png")
talk = Image.load("talkbox.png")
s = 1
statpg = 0
schrift = Font.load("trebuc.ttf")
schrift:setPixelSizes(0,12)
 
selectory = 15
oldpad = Controls.read()
while s ==1 do
pad = Controls.read()
screen:blit(375,0,startbox)
screen:blit(380,selectory,selector)
screen:fontPrint(schrift,398, 23, start1, blue)
screen:fontPrint(schrift,398,43, start2, blue)
screen:fontPrint(schrift,398,63, start3, blue)
screen:fontPrint(schrift,398,83, start4, blue)
 
if pad:down() and oldpad:down() ~=pad:down() and selectory < 75 then
screen.waitVblankStart(10)
    selectory = selectory + 20
end
if pad:up() and oldpad:up() ~= pad:up() and selectory > 15 then
screen.waitVblankStart(10)
    selectory = selectory -20
end
 
if pad:start() and oldpad:start() ~=pad:start() then
s = 0
end
 
if pad:cross() and oldpad:cross() ~= pad:cross() then
if selectory == 35 then
itemlist = 1
elseif selectory == 75 then
s = 0
elseif selectory == 15 then
statpg =1
elseif selectory == 55 then
screen:blit(0,0, talk)
screen:fontPrint(schrift,101,190, start5, blue)
screen:blit(0,0, talk)
screen.waitVblankStart(10)
screen:fontPrint(schrift,101, 190, start6, blue)
if pad:cross() and oldpad:cross() ~= pad:cross() then
    s = 0
end
end
end
screen.waitVblankStart()
screen.flip()
 
oldpad = pad
screen:print(0,0, selectory)
end

How do i fix that error ?

And start1-6 were defined in a script before this one...

sry for my bad english ..


Anuncios Google

Opciones de visualización de comentarios

Seleccione la forma que prefiera para mostrar los comentarios y haga clic en «Guardar las opciones» para activar los cambios.

...

There are many other Files which one should i post? 

The one were i defined the start1-6 ?

And i speak german ...

And i want to make an Menu which appears when you press START in my GAME ...

But with those images and options ...

 

EDIT

 

i fixed it thanks for your support !!!

Imagen de NEKERAFA

Hello!!

Mmm... What language you speak?
I think the issue is in the other file. Can you put the other file here?

Greetings ^-^.

Imagen de markef

So

So I recommend you to start programming in LuaDEV, it's more easy, about this code I say that "conditions" (generally) must be ended before the final end, also would be advisable tell us intentions of the code.

Greetings ;)

Dicen que soy programador... Eso dicen.

Opciones de visualización de comentarios

Seleccione la forma que prefiera para mostrar los comentarios y haga clic en «Guardar las opciones» para activar los cambios.