HardonCollider error when removing bullets

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
MiniDemonic
Prole
Posts: 28
Joined: Tue Mar 20, 2012 10:39 am

HardonCollider error when removing bullets

Post by MiniDemonic »

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
Attachments
zombiething.love
(102.17 KiB) Downloaded 70 times
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: HardonCollider error when removing bullets

Post by Nixola »

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
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
MiniDemonic
Prole
Posts: 28
Joined: Tue Mar 20, 2012 10:39 am

Re: HardonCollider error when removing bullets

Post by MiniDemonic »

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.
User avatar
vrld
Party member
Posts: 917
Joined: Sun Apr 04, 2010 9:14 pm
Location: Germany
Contact:

Re: HardonCollider error when removing bullets

Post by vrld »

Using the newest HC version will most probably fix the error. At least I can't reproduce it anymore.
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.

hump | HC | SUIT | moonshine
MiniDemonic
Prole
Posts: 28
Joined: Tue Mar 20, 2012 10:39 am

Re: HardonCollider error when removing bullets

Post by MiniDemonic »

vrld wrote:Using the newest HC version will most probably fix the error. At least I can't reproduce it anymore.
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. :D

Well thank you vrld for an awesome library, hopefully this error won't come back anymore.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 47 guests