So, the following code fragment is throwing errors (it's trying to call enabled, which is nil for some reason??) and I can't quire figure out why.
Could somebody help, please?
EDIT: For reference, I am calling this from a bunch of different hooks, the relevant ones when this was called being a HUD hook and a MobjThink hook.
EDIT2: The mistake was elsewhere in my code. Oops.
Code:
local enabled = CV_RegisterVar{
name = "ssvc_enabled",
PossibleValues = CV_YesNo,
defaultvalue = "No"
}
local function shouldRun()
return (enabled.value == 1)
and (gametype == GT_COOP)
and (not G_IsSpecialStage())
end
EDIT: For reference, I am calling this from a bunch of different hooks, the relevant ones when this was called being a HUD hook and a MobjThink hook.
EDIT2: The mistake was elsewhere in my code. Oops.
Last edited: