Scope Management for OneSync Infinity

OneSync Scopes
This is a developer resource for tracking scopes and helps with scope management by exporting functions that can be used for more efficient networking with OneSync Infinity servers.

Documentation
Documentation with examples can be found in the README.md file of the GitHub repository below.

GitHub
Open an issue (or PR) if you come across any bugs and/or suggestions!

11 Likes

Nice release.

1 Like

TriggerEventInPlayerScope

Does this sync the event if someone enters the scope after the event is triggered?

After some code interpretation i say no. It’s not syncing to new players entered scope after event trigger.

No. This only sends the event to all players within the scope of the player at the time of calling the export.

after using it it seems no matter what , GetPlayersInScope always return false because of this line of code if(not scopes[source]) then

[script:onesync_scope] START SEARCHING FOR 1
[script:onesync_scope] {
[script:onesync_scope] ["1"] = {
[script:onesync_scope]     [1] = 2,
[script:onesync_scope]     },
[script:onesync_scope] ["2"] = {
[script:onesync_scope]     [1] = 1,
[script:onesync_scope]     },
[script:onesync_scope] }
[script:onesync_scope] SCOPE IS EMPTY!

Open an issue on GitHub and provide a repro, thanks.

i fixed it by converting the ids to number rather than string which currently script is dealing with

    local source = tonumber(data["for"])
    local player = tonumber(data.player)

Could you open a PR with your changes please?

yes sure i did a PR