Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bad timer name #2821

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Fix bad timer name #2821

merged 1 commit into from
Oct 31, 2023

Conversation

Denneisk
Copy link
Member

Also account for self.data not existing in timer

Account for self.data not existing in timer
timer.Create("wire_doSetName_Cleanup", 1, 1, function()
self.data.SetName = nil
timer.Create("wire_doSetName_Cleanup" .. self.entity:EntIndex(), 1, 1, function()
if self and self.data then self.data.SetName = nil end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need self:IsValid() check too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self is the E2 context (table) here, not an entity.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok

@thegrb93 thegrb93 merged commit d9a46cc into wiremod:master Oct 31, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants