So I am trying to develop a zombie top down shooter, but somehow the hardoncollider gives me an error sometime.
No need to give me comments about my coding other than the code that is making the error.
The code is not commented nor is it organised, I'm going to organise it better when I got time.
The code that makes the error is most likely in "function zombie_update" at line 127+ or "function bullet_update" at line 181+ in main.lua
To recreate the error, just hold down lmouse button and then shoot zombies that you spawn with z.
Controls:
w,a,s,d = move
mouse = aim and shoot
z = spawn zombie at mouse
HardonCollider error when removing bullets
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 28
- Joined: Tue Mar 20, 2012 10:39 am
HardonCollider error when removing bullets
- Attachments
-
- zombiething.love
- (102.17 KiB) Downloaded 70 times
Re: HardonCollider error when removing bullets
The error is in the file init.lua, at line 207.
HardonCollider/init.lua:207: attempt to compare number with nil
File that contains the error
Line that contains the error
The error itself
HardonCollider/init.lua:207: attempt to compare number with nil
File that contains the error
Line that contains the error
The error itself
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
-
- Prole
- Posts: 28
- Joined: Tue Mar 20, 2012 10:39 am
Re: HardonCollider error when removing bullets
I know that the error lies in HardonCollider, I have checked line 207 in init.lua but I am not able to fix the error because I didn't develop HardonCollider, the problem is probably fixable by changing the code I use to remove bullets when they collide with stuff.
Re: HardonCollider error when removing bullets
Using the newest HC version will most probably fix the error. At least I can't reproduce it anymore.
-
- Prole
- Posts: 28
- Joined: Tue Mar 20, 2012 10:39 am
Re: HardonCollider error when removing bullets
Seems like you are correct, thought I had the latest version as it wasn't long ago that I downloaded hardoncollider from github, or maybe it was lol I don't keep track of time.vrld wrote:Using the newest HC version will most probably fix the error. At least I can't reproduce it anymore.
Well thank you vrld for an awesome library, hopefully this error won't come back anymore.
Who is online
Users browsing this forum: Google [Bot] and 47 guests