[Bug] State bags values not on first resource tick #36
Korioz
started this conversation in
[BUG] FiveM for GTAV Enhanced
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Defining a replicated state bag value does not make it available on first tick of the resource.
Issue type
Client
Repro rate
Always
Server build version
FXServer-early-access b90 win32
OS
No response
CPU
No response
GPU
No response
RAM
No response
Storage type
None
Connection type
None
ISP and bandwidth
No response
DxDiag
No response
Network graph
No response
Platform
Windows
OS version / distribution
Windows 11
CPU
No response
RAM
No response
Using txAdmin?
No
Hosting provider
Self-hosted
Machine type
Dedicated
/perf endpoint output
No response
DDoS protection
No
ulimit -n value (Linux only)
No response
Docker Compose file (Docker only)
No response
Steps to Reproduce
GlobalState.Test = "myValue"print(GlobalState.Test)nilExpected Behavior
Global state bags values should be available on file read when connecting, not later in a coroutine or with a 1 tick wait, it is working like that on FiveM Gen8. This issue probably happens with entity state bags, to be tested.
Waiting one tick on client side before accessing the value resolves the issue.
Actual Behavior
Global state bags values are not directly available on file execution.
The values seems to be available after 2 ticks.
Code example :
Did not tested when restarting a resource, this setup only tested connecting.
Evidence
No response
Additional Context
No response
All reactions