Don't declare things globally with API methods like this as it can cause scripts to error and never start. Declare it in the onStart or later on in the script.
And this needs to be updated, you never update the value, which is why it will always be the same result.
EDIT: Maybe look into enums btw for your equipment