Non-existent error?

I’ve been testing around in studio lately and I’ve been getting weird errors thrown at me.

I’m concluding that some of them are caused by server issues, but recently, I’ve gotten an error that does not make any sense.

As you can see on like 1043, I have NOT EVEN tried to index “Players”

Does anyone have any conclusions? Is it something wrong on my end?

Thanks!

image

Maybe you pathed it and did “local plr” or something? So thats why it says player instead of plr.

Can you show your entire function please, a lot of the function isn’t in the screen shot. If you could copy and paste the entire function that would be even better. It’s hard to help if we can’t see all of the code.

2 Likes
local cannotload = false;
network.add("settings",function(plr,class,bool)
	local file = getf(plr)
	if file and file.settings and file.settings[class] and require(game.ReplicatedStorage.modules.settings)[class] and (bool == true or bool == false) then
		file.settings[class] = bool
		if (class == "Afk") then
			if file.afk then
				file.afk = bool
			end
		end
	end
end)

not much code, Idk whats goin on

network.add just adds a function to a table, and here is the listener

function network.listen(plr,argument, ...)
	if tonumber(argument) then
		argument = network.keycomp[argument] or nil
	end
	if argument == nil then
		return nil
	end
	local callback = network.listens[argument]
	if callback then
		return callback(plr,...)
	end
end

Often when there is an error inside of a function, it gives an error on the first line of the function and an error on the line of the function that is causing the error. Are there any other errors in the output that could be related to this, or just that error on line 1043?