Skip to content
This repository has been archived by the owner on Dec 16, 2018. It is now read-only.

attempt to index global 'socket' (a nil value) #2

Open
Asalle opened this issue Jun 30, 2018 · 2 comments
Open

attempt to index global 'socket' (a nil value) #2

Asalle opened this issue Jun 30, 2018 · 2 comments

Comments

@Asalle
Copy link

Asalle commented Jun 30, 2018

Hello there,

first of all, thanks for the awesome framework you made, I love it.

But I have a little problem with importing socket, I did everything you said on the readme, but after trying to run love . --test I encountered the following error:

Error: test/lunatest.lua:64: attempt to index global 'socket' (a nil value)
stack traceback:
	[string "boot.lua"]:637: in function '__index'
	test/lunatest.lua:64: in main chunk
	[C]: in function 'require'
	test/lovetest.lua:26: in function 'run'
	main.lua:27: in function 'load'
	[string "boot.lua"]:488: in function <[string "boot.lua"]:487>
	[C]: in function 'xpcall'
	[string "boot.lua"]:650: in function <[string "boot.lua"]:639>
	[C]: in function 'xpcall'

Adding explicit import to lunatest.lua solved the problem.

local socket = require("socket")
@kyleconroy
Copy link
Member

I attempted a fix here: 895e5fc

Can you confirm that it works?

Also, as you can see, this repository hasn't been updated in ages. Are you interested in being a maintainer?

@Asalle
Copy link
Author

Asalle commented Jul 1, 2018

nah, I tried to import it with pcall, it didn't work and your commit doesn't work either.
about the maintaining: maybe, if you have some time for answering my questions from time to time. I'm pretty new to lua and love2d, I started like 3 days ago.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants