Hi!
I am currently trying to use the HC library, but I cannot figure out how. The library page on the wiki says it's already "in" Löve, but I cannot use HC with the example they provide on their document page here: http://hc.readthedocs.io/en/latest/index.html, so it clearly isn't. Trying to run the program gives me this error:
I tried to install HC with Luarocks and cloning it via git, but neither worked.
Can someone enlighten me on what I'm doing wrong?
How to use libraries?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: How to use libraries?
If you mean this [wiki]HC[/wiki] article, then i don't see where it says that it's "(included) in Löve".
It only says that it's a "pure lua" library, meaning it does not need Löve or any other libs to work; one could use it in any other lua-compatible program as well. (like one with a lua interpreter, for example)
Just download the repo from github, zipped is the easiest way, then unpack the files into the folder where you have your main.lua, and do, or just follow the example(s) on the docs site.
(You can put it in folders too, if they're not outside the one with your main.lua, though the require "path" will get longer; also, you'll need to use dots instead of slashes.)
It only says that it's a "pure lua" library, meaning it does not need Löve or any other libs to work; one could use it in any other lua-compatible program as well. (like one with a lua interpreter, for example)
Just download the repo from github, zipped is the easiest way, then unpack the files into the folder where you have your main.lua, and do
Code: Select all
HC = require 'HC'
(You can put it in folders too, if they're not outside the one with your main.lua, though the require "path" will get longer; also, you'll need to use dots instead of slashes.)
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: How to use libraries?
That worked! Thanks a lot!
For future readers: Be sure to rename the HC-master folder to just HC, or else you will get errors!
For future readers: Be sure to rename the HC-master folder to just HC, or else you will get errors!
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: How to use libraries?
Or, you require "HC-master" instead; best to understand why something happens
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Who is online
Users browsing this forum: Google [Bot] and 4 guests