OpenSim.Region.ScriptEngine.Shared.Api.OSSL_Api.osGetNotecardLine C# (CSharp) Method

osGetNotecardLine() public method

Directly get an entire notecard at once.
Instead of using the LSL Dataserver event to pull notecard data this will simply read the entire notecard and return its data as a string. Warning - due to the synchronous method this function uses to fetch assets, its use may be dangerous and unreliable while running in grid mode.
public osGetNotecardLine ( string name, int line ) : string
name string Name of the notecard or its asset id
line int The line number to read. The first line is line 0
return string
        public string osGetNotecardLine(string name, int line)
        {
            CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNotecardLine");
            m_host.AddScriptLPS(1);

            UUID assetID = CacheNotecard(name);

            if (assetID == UUID.Zero)
            {
                OSSLShoutError("Notecard '" + name + "' could not be found.");
                return "ERROR!";
            }

            return NotecardCache.GetLine(assetID, line);
        }
OSSL_Api