How to install libraries?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
How to install libraries?
help, how can I install a library in love2d and lua? I've been searching for days and can't find how to install the "push" library :c
- CogentInvalid
- Prole
- Posts: 27
- Joined: Sat Dec 14, 2013 12:15 am
Re: How to install libraries?
Put push.lua in your game's main folder and call
in your code.
Code: Select all
push = require "push"
-
- Prole
- Posts: 1
- Joined: Sat Jun 25, 2022 5:55 pm
Re: How to install libraries?
I'm trying to install literally any package, but a file that is just `push = require "push"` returns for me the following error:
and this is the first result on google for "love2d installing libraries"
Code: Select all
Error: main.lua:1: module 'push' not found:
no field package.preload['push']
no 'push' in LOVE game directories.
no file 'push' in LOVE paths.
no file './push.lua'
no file '/usr/share/luajit-2.1.0-beta3/push.lua'
no file '/usr/local/share/lua/5.1/push.lua'
no file '/usr/local/share/lua/5.1/push/init.lua'
no file '/usr/share/lua/5.1/push.lua'
no file '/usr/share/lua/5.1/push/init.lua'
no file './push.so'
no file '/usr/local/lib/lua/5.1/push.so'
no file '/usr/lib/x86_64-linux-gnu/lua/5.1/push.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[love "boot.lua"]:345: in function <[love "boot.lua"]:341>
[C]: in function 'require'
main.lua:1: in main chunk
[C]: in function 'require'
[love "boot.lua"]:316: in function <[love "boot.lua"]:126>
[C]: in function 'xpcall'
[love "boot.lua"]:355: in function <[love "boot.lua"]:348>
[C]: in function 'xpcall'
Re: How to install libraries?
Have you tried to put push.lua in your game's main folder as CogentInvalid said?
Who is online
Users browsing this forum: Google [Bot] and 0 guests