Skip to content

CS:S - broken Event keyvalues (crashes in @Event) #536

Description

@kirrm

The 2026-09-16 update seems to have broken Event.variables KeyValues object

Event.variables.name works fine, but trying to access actual keyvalues data either returns default values or crashes:

@Event('player_death')
def _player_death(ev):
    print(f"{ev.variables.name=}")
    print(f"{ev.variables.get_int('userid')=}")  # Crash


@Event('player_spawn')
def _player_spawn(ev):
    print(f"{ev.variables.name=}")
    print(f"{ev.variables.get_int('userid')=}")  # returns default (0)

As such, trying to access Event variables without Event's own getter method (get_int, get_sting etc) will lead to either crashes or KeyErrors:

@Event('player_death')
def _player_death(ev):
    ev['userid']  # Crash

The workaround is using Event's own getter methods:

@Event('player_death')
def _player_death(ev):
    ev.get_int('userid')  # Works

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions