Page 1 of 1

'sysUtil.appConf()' is not assigned to the 'app.utils' variable

Posted: Tue Dec 26, 2023 2:34 pm
by Cauan
Hi, and sorry by the English, I'm using Google translator

I'm having an error, when I try to call the app.utils function, assigned to the lua file by 'aap.lua', it doesn't work.

I don't know what it could be, because I didn't understand the error the error may be in front of me, but I won't be able to solve it

The love file:

Re: 'sysUtil.appConf()' is not assigned to the 'app.utils' variable

Posted: Tue Dec 26, 2023 5:54 pm
by Bobble68
I don't get the error you get when I run it, so it would help if you said what it is.

I'll have to guess what your problem is, but app.utils is not a function - it is a table that contains the functions getHour() and setBackgroundColor(). To call these functions, you'll have to do something like app.utils.getHour() or app.utils.setBackgroundColor().

Re: 'sysUtil.appConf()' is not assigned to the 'app.utils' variable

Posted: Tue Dec 26, 2023 7:07 pm
by Cauan
in clock.lua for example, I tried to use getHour, from the utils table assigned by appConf(aap.lua)
Then it gave an error that there was no getHour in the utils table
So I removed getHour and did it using os.date anyway