Hardon Collider Funkyness
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Hardon Collider Funkyness
So I'm a little confused because I don't know which file of the Hardon Require libarary to require: https://github.com/vrld/HC
-
- Party member
- Posts: 548
- Joined: Wed Oct 05, 2016 11:53 am
Re: Hardon Collider Funkyness
Basically, there are a couple of main ways to make libraries and modules in lua:
1. You require a single, specific file. If the library needs other files to function, it handles requiring them on its own.
2. You have a folder with init.lua in it. The init.lua basically initializes and returns the library, if the folder is passed to require().
Hardon Collider uses the second approach. So, if you grab HC's files, and place them into a folder named "HC" next to your main.lua, you can just require it with:
1. You require a single, specific file. If the library needs other files to function, it handles requiring them on its own.
2. You have a folder with init.lua in it. The init.lua basically initializes and returns the library, if the folder is passed to require().
Hardon Collider uses the second approach. So, if you grab HC's files, and place them into a folder named "HC" next to your main.lua, you can just require it with:
Code: Select all
local HC = require 'HC'
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 3 guests