Errors with a code fragment

Status
Not open for further replies.

tertu

cheap spirit
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.
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
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.
 
Last edited:
Status
Not open for further replies.

Who is viewing this thread (Total: 0, Members: 0, Guests: 0)

Back
Top