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: Resolve an error when giving keys without ID #158

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zozomanx
Copy link

@zozomanx zozomanx commented Dec 6, 2024

Description

When attempting to hand keys to someone standing next to you without using an ID an error would be generated:
image

The error was from a nil value. I added a config setting, got rid of the nil value error, and added in user notifications.

Before: https://medal.tv/games/gta-v/clips/je2GVr3kBS0OLfjWB?invite=cr-MSxsZ3csMTk1NzEzNDc0LA
After: https://medal.tv/games/gta-v/clips/je2JXUH9ehD7sHQ5P?invite=cr-MSxPYUMsMTk1NzEzNDc0LA

Checklist

  • I have personally loaded this code into an updated Qbox project and checked all of its functionality.
  • My pull request fits the contribution guidelines & code conventions.

When attempting to give keys to another player without an ID an error was given.

It had to do with closestDistance being nil.
Added a new config option "distanceToHandKeys = 3" so players can adjust the range at which to hand keys over.
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