- Consistency fix: Like llGetNumberOfNotecardLines, llGetNotecardLine returns NULL_KEY on error now

- Conformance fix: If the notecard can't be found, shout on DEBUG_CHANNEL as the docs state
- Bug fix: Don't let llGetNotecardLine throw an exception on freshly created notecards
0.6.0-stable
Homer Horwitz 2008-09-20 17:32:58 +00:00
parent 42f04233a4
commit f352d6ed9b
1 changed files with 13 additions and 1 deletions

View File

@ -8067,6 +8067,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return tid.ToString();
}
}
// if we got to here, we didn't find the notecard the script was asking for
// => complain loudly, as specified by the LSL docs
ShoutError("Notecard '" + name + "' could not be found.");
// ScriptSleep(100);
return UUID.Zero.ToString();
}
@ -8109,8 +8113,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
}
// if we got to here, we didn't find the notecard the script was asking for
// => complain loudly, as specified by the LSL docs
ShoutError("Notecard '" + name + "' could not be found.");
// ScriptSleep(100);
return String.Empty;
return UUID.Zero.ToString();
}
}
@ -8169,6 +8177,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
case 0:
words = input[idx].Split(' '); // Linden text ver
// Notecards are created *really* empty. Treat that as "no text" (just like after saving an empty notecard)
if (words.Length < 3)
return new String[0];
int version = int.Parse(words[3]);
if (version != 2)
return new String[0];