Persistent Script not running


#1

Hi,
I added a persistent script to my domain server. It doesn’t seem to do anything.
I added some print statements for debug. They don’t show up in the script log.

Here’s my script url: http://www.spinteractive.net/3D/disconnectNonMeggaWorldUser.js

Any ideas?


#2

I would guess that your script is not geared to detect anything if you run it on the server it-self (as an AC Script).

If you run it from an entity, it might run, but you certainly can’t kick someone from there.
unless it is run from a user allowed to ban people.


#3

If you’re running the script from the server Settings Web page in the Scripts > Persistent Scripts section, you’re running the script as an AC (assignment client) script.

For AC scripts, the print() statement output goes into the server logs, not Interface’s program logs. On Window, you can find the server logs by right-clicking the server icon in the system tray and selecting “View Logs”. Alternatively, see the following directory on your server PC: \AppData\Roaming\High Fidelity\Server Console\logs

When I run your script as an AC script I get the following error in the logs:

[cdisconnectNonMeggaWorldUser.js] [UncaughtException evaluate] Error: Can't find variable: Account

This is because the Account API is not available for use in AC scripts.


#4

Thank you both for the response. I am trying to control access to the domain via code/API (not manually).

In the doc for the AC script it says the following: ‘Coordinating actions between entities and avatars, having a virtual pet to greet anyone who visits your domain, access control.’
https://docs.highfidelity.com/create-and-explore/all-about-scripting
It says ‘access control’.

There is no API for the groups/lists.

Can you offer any suggestions how to implement ‘access control’ via code?