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(bridge/qb): "attempt to compare number with boolean" error fix #1587

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

someone005
Copy link
Contributor

Fix of issue 1582

@thelindat
Copy link
Member

Going to assume this happens when checking for an item that does not exist? Your fix isn't really appropriate though.

@someone005
Copy link
Contributor Author

it would fix this error because GetItemCount always returns number instead of boolean so there is no possibility for this error to happen again

@thelindat
Copy link
Member

thelindat commented Mar 1, 2024

it would fix this error because GetItemCount always returns number instead of boolean so there is no possibility for this error to happen again

You didn't answer my question, and you can just do "or 0" so that you don't end up comparing false to a number.

Your fix isn't really appropriate though.

However I didn't realise this was on the client so the item count is already stored. On server this would be an issue due to iterating the entire inventory for each item.

@thelindat thelindat merged commit 7632fea into overextended:main Mar 1, 2024
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.

None yet

2 participants