[Onesync+] GetHostId() returns null, rcon log then throws error

Server

Operating system: Windows Server 2019
Artifact version: Latest
IP address: dev.swrp.cz:11111
Resources: ESX etc… i dont think this really matters
System specifications: 8gb ram, KVM

Incident

Summary: Just looked into my onesync server console and saw rcon log error in rconlog_server on line 12 so i started investigating and noticed that GetHostId() returns NULL
Expected behavior: GetHostId() should return some player id maybe ? its GTA:O thing so i dont really know what it should do on fivem
Actual behavior: returns null, rcon log uses this and it returns null into TriggerClientEvent so then rcon log throws error.
Steps to reproduce: run onesync server and make server script that has this line: print(GetHostId())
Server/Client? server
Files for repro (if any): none
Error screenshot (if any): https://ctrlv.cz/szYU
.dmp files/report IDs: no dump.

Any additional info: https://ctrlv.cz/xrlO

GetHostId is deprecated, disable ■■■■■■■ or fix it

Or just IGNORE THE ERROR MESSAGE.

Is there an alternative, or does OneSync not have a host? I’m currently trying to update a script that uses this native.

OneSync does not have a host, it uses a reserved player id (31) to handle ownership, acks, migration and sync data.

Ah, thanks. Do client scripts get run by the server via this reserved ID? Or does everything previously run by the host need to be ported over to the server side scripts? Btw if I have further questions should I open a new thread?

1 Like