Keep getting Table error preventing enemies from showing
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 2
- Joined: Fri Jul 12, 2013 7:20 pm
Keep getting Table error preventing enemies from showing
I'm new to the Love scene, and I have been trying to make a game similar to Halo 2600, but am unable to get any of the enemies or "shots" to show up on the display. I can get most things to work, such as collision and music but I keep getting an error based around the Table and I was wondering if I could get any help here. I don't really understand the error so I thought this would be the best place. When I fix one error, it seems that another creates itself. Please help. Attached is the .love file.
- Attachments
-
- Love2D Game.love
- (8 MiB) Downloaded 75 times
Re: Keep getting Table error preventing enemies from showing
Hi, I made three changes in your code, to make it run.
1) There is an "end" missing in line 56
2) a variable cannot hold an image and a table at the same time. To fix this replace this:
by this
3) The drawing has to be adapted accordingly to:
1) There is an "end" missing in line 56
2) a variable cannot hold an image and a table at the same time. To fix this replace this:
Code: Select all
player = love.graphics.newImage("Flower.png")
Code: Select all
player = {}
player.image = love.graphics.newImage("Flower.png")
Code: Select all
love.graphics.draw(player.image,px,py)
Check out my blog on gamedev
-
- Prole
- Posts: 2
- Joined: Fri Jul 12, 2013 7:20 pm
Re: Keep getting Table error preventing enemies from showing
Thank you!micha wrote:Hi, I made three changes in your code, to make it run.
1) There is an "end" missing in line 56
2) a variable cannot hold an image and a table at the same time. To fix this replace this:by thisCode: Select all
player = love.graphics.newImage("Flower.png")
3) The drawing has to be adapted accordingly to:Code: Select all
player = {} player.image = love.graphics.newImage("Flower.png")
Code: Select all
love.graphics.draw(player.image,px,py)
Who is online
Users browsing this forum: Google [Bot] and 5 guests