Skip to content

[lua] Add nil check to black dragon title obtainment#9378

Merged
Xaver-DaRed merged 1 commit into
LandSandBoat:basefrom
WinterSolstice8:nil_check
Feb 6, 2026
Merged

[lua] Add nil check to black dragon title obtainment#9378
Xaver-DaRed merged 1 commit into
LandSandBoat:basefrom
WinterSolstice8:nil_check

Conversation

@WinterSolstice8
Copy link
Copy Markdown
Contributor

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

player can be nil in some cases, so add a nil check to prevent errors

Steps to test these changes

!hp 0 the dragon, get no errors

@almuth150
Copy link
Copy Markdown

I think this is a problem with quite a few mobs, actually (ie. every mob that gives a title, and other stuff that does stuff to player entities on death). Is there more cases of causing this kind of error, where the player is nil? If it's just from !hp 0 on the mob, that's not something that's seen in normal gameplay, but if this behaviour can occur during normal gameplay, that would be a problem.

@Xaver-DaRed Xaver-DaRed merged commit 030c906 into LandSandBoat:base Feb 6, 2026
11 checks 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.

3 participants