In my module script, I set this one key to have a function as its value, but when I use an if statement to find out if the key is set to a function, the script doesn’t see the key as a function. What’s even more odd is that, when I print the dictionary together, the output says the key is equal to exactly what I put in the if statement, but when I print the key alone, it gives me something very different. Any way to properly detect that the value is a function?
if filter ~= nil then
for i,v in ipairs(filter) do
print(v) --["replacement"] = "function"
if v.filter(val) == true then
print(v.replacement) --function: 0x22bb8b8a468a5c9a
if v.replacement == "function" then
mathplace = v.replacement(val)
elseif v.replacement ~= "function" then
mathplace = v.replacement
end
end
end
end