[solved] HardonCollider module not found

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
User avatar
OnACoffeeBreak
Prole
Posts: 28
Joined: Tue Apr 11, 2017 11:19 am

[solved] HardonCollider module not found

Post by OnACoffeeBreak »

I am following the HardonCollider tutorial. I cloned the module from GitHub

Code: Select all

git clone git://github.com/vrld/HardonCollider.git
and organized the file/directory structure per the tutorial.

Code: Select all

HC = require 'hardoncollider'
Fails with

[string "HC = require 'hardoncollider'..."]:1: module 'hardoncollider' not found:

I am guessing it's because there's no hardoncollider.lua file and hardoncollider/init.lua is not being loaded. I tried following advice given here, but it didn't help: http://kiki.to/blog/2014/04/12/rule-5-b ... l-packages

Halp, please?
Attachments
hardoncollider_test.zip
(1.05 MiB) Downloaded 75 times
Last edited by OnACoffeeBreak on Sun Apr 23, 2017 6:19 pm, edited 1 time in total.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: HardonCollider module not found

Post by raidho36 »

Module is named with capital casing, and you used all lowercase letters. Of course the two don't match.
User avatar
OnACoffeeBreak
Prole
Posts: 28
Joined: Tue Apr 11, 2017 11:19 am

Re: HardonCollider module not found

Post by OnACoffeeBreak »

Tried to match the case of the module folder in the require string. No joy.

Tried making the module folder name all lower case chars and matching require string. No joy.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: HardonCollider module not found

Post by bartbes »

If I match the case it works for me. It does give another error though.
User avatar
OnACoffeeBreak
Prole
Posts: 28
Joined: Tue Apr 11, 2017 11:19 am

Re: HardonCollider module not found

Post by OnACoffeeBreak »

@bartbes. The error I'm actually getting is "main.lua:42: attempt to call method 'addCircle' (a nil value)". I'm thinking it's because HC is nil.

I renamed the directory to all lower-case "hardoncollider". When I type

Code: Select all

HC = require 'hardoncollider'
into ZeroBrane's console, I get this:

Code: Select all

HC = require 'hardoncollider'
[string "HC = require 'hardoncollider'"]:1: module 'hardoncollider' not found:
	no field package.preload['hardoncollider']
	no file 'lualibs/hardoncollider.lua'
	no file 'lualibs/hardoncollider/hardoncollider.lua'
	no file 'lualibs/hardoncollider/init.lua'
	no file 'lualibs/hardoncollider/hardoncollider/hardoncollider.lua'
	no file 'lualibs/hardoncollider/hardoncollider/init.lua'
	no file '.\hardoncollider.lua'
	no file 'C:\Users\hector\Downloads\ZeroBraneStudio\lua\hardoncollider.lua'
	no file 'C:\Users\hector\Downloads\ZeroBraneStudio\lua\hardoncollider\init.lua'
	no file 'bin/hardoncollider.dll'
	no file 'bin/clibs/hardoncollider.dll'
	no file '.\hardoncollider.dll'
	no file 'C:\Users\hector\Downloads\ZeroBraneStudio\hardoncollider.dll'
It appears that Lua is not even looking inside the hardoncollider directory.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: HardonCollider module not found

Post by raidho36 »

You get the other error because addCircle doesn't in fact exist. If you look at metatable listing, you'll only find "circle".
User avatar
OnACoffeeBreak
Prole
Posts: 28
Joined: Tue Apr 11, 2017 11:19 am

Re: HardonCollider module not found

Post by OnACoffeeBreak »

You are correct. I figured out how to watch an expression in ZeroBrane and HC is definitely not nil.

Looks like the tutorial is out of date with the code.

Thanks for your help!
Post Reply

Who is online

Users browsing this forum: sbr2729 and 52 guests