A forum topic for reporting bugs and other issues with CastleOS
Do scripts actually get run?
Tommy Long Posts: 218
4/9/2017
|
Using 1.3.3170. Have set up a scene that is suppose to run a script. The Log indicates it runs the script, but can't find any evidence that the script was actually executed. The following script did not speak, nor write a log entry.
using System; using System.Collections.Generic; using CastleOSCoreService;
public class MyScript {
public void Main(string[] args) { // This method call will create a database entry in the main log. You can write anything you'd // like here and it will add it to the DB queue for logging. Queue operates as first in first out.
ScriptingAPI.WriteDatabaseEntry("This is a test database entry.");
// This method call will speak the text of your choice to the speaker of your choice. // You'll notice two strings, the first is the text to be spoken, and the second is the ID // of the speaker to speak through. By default, enter "all" to speak to any connected or // detected speaker. But you can also specify the speaker, as we'll show in the next section.
ScriptingAPI.Speak("This is a demo announcement to all speakers.", "all");
} }
|
|
0
link
|