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 .
Sir_Titas
Prole
Posts: 1 Joined: Wed Apr 29, 2015 12:42 pm
Post
by Sir_Titas » Wed Apr 29, 2015 12:52 pm
hey guys
im pretty new to love2d and am having some trouble with loading external code into my project
here is my code
Code: Select all
love.filesystem.init()
main = love.filesystem.load('data/main.lua')()
and here is my error
Code: Select all
Error
main.lua:1:bad argument #1 to 'init'(string expected, got no value)
traceback
[C]: in function 'init'
main.lua:1: in main chunk
[C]: in function 'require'
[C]: in function 'xpcall'
Nixola
Inner party member
Posts: 1949 Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy
Post
by Nixola » Wed Apr 29, 2015 2:04 pm
Just drop the first line. [wiki]love.filesystem.init[/wiki] is automatically called by LÖVE, when needed, you don't have to call it to have it working
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Users browsing this forum: Google [Bot] , slime and 4 guests