No libraries are working for me :/
Posted: Wed Aug 24, 2022 3:17 pm
So I've been trying to create a screen that switches between multiple different images, almost identically to the home screen of Five Nights at Freddy's 1. My issue has been timers and delays, trying to get functions to execute after a set amount of time. I've seen a lot of people suggest using the Cron or Tick libraries, but when I set them up and try to run the program, I get this error every time;
Error
main.lua:5: attempt to index local 'cron' (a boolean value)
Traceback
[love "callbacks.lua"]:228: in function 'handler'
main.lua:5: in main chunk
[C]: in function 'require'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
this is the line it is referencing;
cron.update(dt)
i believe i've set everything up correctly, i have the cron.lua file in my main game folder, and the first line in my main.lua file is;
local cron = require 'cron'
i've tried getting rid of the "local" part, no difference is made. i hope i'm just being dumb, could someone please help me out? i've been going crazy over the course of the last hour trying to solve this.
Error
main.lua:5: attempt to index local 'cron' (a boolean value)
Traceback
[love "callbacks.lua"]:228: in function 'handler'
main.lua:5: in main chunk
[C]: in function 'require'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
this is the line it is referencing;
cron.update(dt)
i believe i've set everything up correctly, i have the cron.lua file in my main game folder, and the first line in my main.lua file is;
local cron = require 'cron'
i've tried getting rid of the "local" part, no difference is made. i hope i'm just being dumb, could someone please help me out? i've been going crazy over the course of the last hour trying to solve this.