In my code i get this error:
what does it mean?Code:error: index.lua:66: attempt to index global `enemy' (a function value)
Printable View
In my code i get this error:
what does it mean?Code:error: index.lua:66: attempt to index global `enemy' (a function value)
i dont know what it exactly means, but i have that all the time. If you post your code, or atleast that line, maybe i can help.
oh, it's okay i had named a function the same as a table in my code. I have another problem if you can help me, can i PM you, i just don't want to show my code to the public yet?
sure i got it and ill take a look
cheers mate.
With this code everything works excpept background is not there.
Code:while true do
screen:blit(0,0,background,false)
character()
enemyset()
screen.waitVblankStart()
screen.flip()
end
Make sure your 2 functions:
character()
enemyset()
don't erase the background
Ahh thanks.
What is wrong here:
Code:if enemy.x > 0 then
enemy.x =+ 10
end
There you go.Code:if enemy.x > 0 then
enemy.x =enemy.x + 10
end