#Help with learning

1 messages · Page 1 of 1 (latest)

teal harness
#

Hello guys, I've been trying to learn scripting for 2 weeks now and I'm starting to learn how to do metatables and some events etc. So I made a module that detects if an element in a table changes and hooked is hooked with a signal. I don't know many terms outside just me experimenting stuff as well.

The module works fine but if someone can give me a slap on the wrist and critic my code would be great. And if there are bad habit that I used please do let me know thanks.

#

Module:

#

Server Usage:

weary dirge
# teal harness

why do you put the error checks at the bottom of your functions and not the top

teal harness
#

No reason really. If I created a table before the error check would that be saved on a memory. I'm still not used to how it works.

#

But yea I can put it on top and wouldn't break anything

#

I figured it looked nice putting it there 💀

teal harness
#

that actually helped me find a potential bug. If the signal disconnected the saved table is turned nil then the listen function wont run. So i moved the registred table check at the connection method