Skip to content

Fixed callback does not exist error#732

Merged
ChatDisabled merged 1 commit intoQbox-project:mainfrom
LumaNodeStudios:main
Mar 21, 2026
Merged

Fixed callback does not exist error#732
ChatDisabled merged 1 commit intoQbox-project:mainfrom
LumaNodeStudios:main

Conversation

@LumaNodeStudios
Copy link
Copy Markdown
Contributor

Description

This PR fixes the client error of the "qbx_core:server:getVehiclesToSpawn" callback not existing if the "qbx:vehiclePersistenceType" convar is not set to "full"

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.

@realgeneraliroh
Copy link
Copy Markdown
Contributor

Why is the guard clause not in the event handler?

@LumaNodeStudios
Copy link
Copy Markdown
Contributor Author

Why is the guard clause not in the event handler?

I'm not sure I see the benefit of registering the OnPlayerLoaded and removeVehZone event handlers if the persistence convar isn't set to full. Is there a specific reason they need to be registered even when they won't execute any logic?

@realgeneraliroh
Copy link
Copy Markdown
Contributor

Why is the guard clause not in the event handler?

I'm not sure I see the benefit of registering the OnPlayerLoaded and removeVehZone event handlers if the persistence convar isn't set to full. Is there a specific reason they need to be registered even when they won't execute any logic?

That makes sense. I had not fully analyzed the logic, yet. But now looking at it, you are right. The last two functions are unneeded, if the server is not in full mode. Just looks a bit "odd" to me, with the guard clause sitting out on its lonesome. Haha

@ChatDisabled ChatDisabled merged commit dcd1d66 into Qbox-project:main Mar 21, 2026
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