Hi everyone,
I’ve encountered a strange behavior with the Lua Function GetAllVehicles() using OneSync on the server-side in my scripts.
It seems that this function is only working on some versions of Windows, and it’s not working on any Linux distributions (that I’ve tested).
1. Client (production/canary) and FXServer version
Bug affects Server only: Tested with Various Builds, (for example Build 3922)
2. What you expected to happen
Expected a Vehicle Count greater than 0
3. What actually happens
Vehicle Count always 0 for some OS (see below tested OS Versions)
4. Category of bug (eg. client, server, weapons, peds, native)
Server
5. Reproducible steps, preferably with example script(s)
Example Script (server-side):
-- Count Total Cars
local count = 0
for _, car in pairs(GetAllVehicles()) do
count = count + 1
end
print(("Count: %d"):format(count))
Test Result
- Windows Build 1909 (Dev Tools, Workstation) - Working
- Windows Build 2004 (Fresh Install, incl. VC-Redist64bit) - Working
- Windows Build 20H2 (Fresh Install, incl. VC-Redist64bit) - Vehicle Count is 0
- Windows Build 21H1 (Fresh Install, incl. VC-Redist64bit) - Vehicle Count is 0
- Linux Ubuntu 18.04 (Fresh Install) - Vehicle Count is 0
- Linux Ubuntu 20.04 (Fresh Install) - Vehicle Count is 0
- Linux Debian 10 (Fresh Install) - Vehicle Count is 0
It seems odd, that this Lua Function is only working for some specific versions of Windows.
Any help is highly appreciated!
Thanks everyone!