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

refactor(server/consumables): remove unused Player variable #480

Merged
merged 8 commits into from
Jan 6, 2025

Conversation

Cocodrulo
Copy link
Contributor

Describe Pull request
This PR attempts to fix all linting errors of the smallresources script. There is still one error to be fixed, I would really thank any help.

If your PR is to fix an issue mention that issue here: No

Questions (please complete the following information):

  • Have you personally loaded this code into an updated qbcore project and checked all it's functionality? no (BUt only remove unused variables so it shouln't be any problem with the actual functionallity)
  • Does your code fit the style guidelines? yes
  • Does your PR fit the contribution guidelines? yes

@Cocodrulo
Copy link
Contributor Author

I've done all I know

server/logs.lua Outdated
@@ -86,6 +85,7 @@ RegisterNetEvent('qb-log:server:CreateLog', function(name, title, color, message
logQueue[name][#logQueue[name] + 1] = { webhook = webHook, data = embedData }

if #logQueue[name] >= 10 then
local postData = {}

Choose a reason for hiding this comment

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

Try initialising postData as nil, or no value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems that this change does not fix the "issue"

server/logs.lua Outdated
@@ -86,6 +85,7 @@ RegisterNetEvent('qb-log:server:CreateLog', function(name, title, color, message
logQueue[name][#logQueue[name] + 1] = { webhook = webHook, data = embedData }

if #logQueue[name] >= 10 then
local postData = nil

Choose a reason for hiding this comment

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

Try initialising it with our else data, and append content if tag is true (postData.content = '@everyone'). This means the else block wouldn't be needed.
local postData = { username = 'QB Logs', embeds = {} }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for your comment!!

@Cocodrulo
Copy link
Contributor Author

OHHH YES, finally!!!

RojinxChhetri

This comment was marked as resolved.

@GhzGarage GhzGarage merged commit b0d7d84 into qbcore-framework:main Jan 6, 2025
2 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.

4 participants