So i’m setting up some enums in my base SWEP. Let’s say i do this:
TEST_ENUM = 1[/lua]
In a weapon that uses it as a base, i’m setting a variable to use the global. Something like:
SWEP.Primary.Test = TEST_ENUM[/lua]
The problem is, it seems my weapons that use the base SWEP are loaded first (before the base SWEP is loaded), so the enum doesn’t exist when they’re set up. So as a result, SWEP.Primary.Test is nil.
How is it determined which SWEPs are loaded first? What’s the best solution to this problem other than setting the variable at a later time?