can loaded APIs have their own variables?

Started by TheTinyDeskEngineer, Aug 21, 2021, 06:53 pm

Previous topic - Next topic


Aug 21, 2021, 06:53 pm Last Edit: Aug 21, 2021, 06:57 pm by TheTinyDeskEngineer Reason: I'm dumb and didn't try it before posting this
I'm trying to make an API which keeps track of user input and allows for easily checking if a key is pressed, and I want to have tables that store what keys and mouse buttons are held down, but I can't find anything that mentions variables in APIs in any way.

I made a simple test function and I have found out that APIs can, indeed declare variables. I don't know why I didn't do that first.


are you using os.loadAPI or require? (note: you should be using require because superglobals are bad)