Skip to content

Conversation

@WirzRexTon
Copy link

Renamed local variable table to request to avoid shadowing Lua's global table library.

Corrected function names ServerRecieve and ClientRecieve → ServerReceive / ClientReceive.

Standardized "unknown" string casing for GetInvokingResource() comparisons.

Added fallback in AwaitServerCallback: table.unpack(p.value or {}) to prevent nil errors.

Description


Motivation

Shadowing the Lua global table library with a local variable, which could break table.unpack.
Misspelled function names (ServerRecieve / ClientRecieve) causing confusion.
Inconsistent casing of "unknown" in resource checks, which could lead to logical errors.
Potential runtime errors if p.value is nil when awaiting a server callback.
Overall, these corrections improve code safety, reliability, and readability.


Implementation Details

Renamed the local variable table to request to preserve access to the global table library.

Corrected function names to ServerReceive and ClientReceive.

Standardized "unknown" string in all GetInvokingResource() comparisons.

Added a fallback in ESX.AwaitServerCallback: table.unpack(p.value or {}) to prevent nil errors.

PR Checklist

  • [ X] My commit messages and PR title follow the Conventional Commits standard.
  • [ X] My changes have been tested locally and function as expected.
  • [X ] My PR does not introduce any breaking changes.
  • [X ] I have provided a clear explanation of what my PR does, including the reasoning behind the changes and any relevant context.

Kenshiin13 and others added 28 commits August 24, 2025 17:20
Apparently, passing leading nil values via an export breaks it entirely.
…ment-isValid-on-register-command

add a new argument on the register command feature
feat(esx_menu_default) Redesign of the menu.
fix(esx_menu_default): remove debug print
Renamed local variable table to request to avoid shadowing Lua's global table library.

Corrected function names ServerRecieve and ClientRecieve → ServerReceive / ClientReceive.

Standardized "unknown" string casing for GetInvokingResource() comparisons.

Added fallback in AwaitServerCallback: table.unpack(p.value or {}) to prevent nil errors.
@Kenshiin13 Kenshiin13 changed the base branch from main to dev September 10, 2025 07:10
@Kenshiin13 Kenshiin13 changed the title Update callback.lua fix(es_extended/server/modules/callback): refactor var naming & fix potential nil errors Sep 10, 2025
@CLAassistant
Copy link

CLAassistant commented Nov 16, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 4 committers have signed the CLA.

✅ Kenshiin13
✅ Kr3mu
❌ github-actions[bot]
❌ WirzRexTon
You have signed the CLA already but the status is still pending? Let us recheck it.

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