I Think I'm Going Crazy... Lua Error Requiring

Language: JP EN DE FR
New Items
2023-11-19
users online
Forum » Windower » Support » I think I'm going crazy... lua error requiring
I think I'm going crazy... lua error requiring
 Shiva.Malthar
Offline
Server: Shiva
Game: FFXI
user: Malthar
Posts: 516
By Shiva.Malthar 2017-06-19 00:39:54
Link | Quote | Reply
 
In two separate addons, let's call them addon1 and addon2, at the very first line, I type:

packets = require('packets')

The first file doesn't load and returns the error:

addon1: Lua runtimme error: libs/packets/fields.lua:636 "Slots" is not defined for booleans.

The second file loads just fine. Am I going crazy?!

Here is a video to show what's going on.
Am I loosing my mind?!
 Shiva.Malthar
Offline
Server: Shiva
Game: FFXI
user: Malthar
Posts: 516
By Shiva.Malthar 2017-06-20 05:20:59
Link | Quote | Reply
 
Is everyone as dumbfounded by this as I was? Well, I figured out why this was happening. I will let you know in a very short while. And the answer will be not what you expect.
 Lakshmi.Miang
Offline
Server: Lakshmi
Game: FFXI
user: Miang
Posts: 37
By Lakshmi.Miang 2017-06-20 07:48:31
Link | Quote | Reply
 
Well apparently on line 636 it's referencing res.slots, so my first assumption based on the error is that you're creating a res variable as a global somewhere, and making it a boolean, i.e. true|false. Then when it tries to reference it, it finds a boolean instead of a table and throws an error.

I'd try moving packets to the first line and if that solves it, then it's one of the other requires breaking it.
 Asura.Saevel
Offline
Server: Asura
Game: FFXI
Posts: 9700
By Asura.Saevel 2017-06-20 08:21:36
Link | Quote | Reply
 
Shiva.Malthar said: »
Is everyone as dumbfounded by this as I was? Well, I figured out why this was happening. I will let you know in a very short while. And the answer will be not what you expect.

Sounds like facebook clickbait..
 Shiva.Malthar
Offline
Server: Shiva
Game: FFXI
user: Malthar
Posts: 516
By Shiva.Malthar 2017-06-20 12:55:13
Link | Quote | Reply
 
Nope, nope, nope

It was something so simple I would have slapped myself in the back of the head if I could.

In the addon directory I have a file named "resources.lua" x.x

Yeah, that happened.
Log in to post.