diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 4da1b3bc68..e013369499 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -4597,8 +4597,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Types.LSLInteger llGetFreeMemory() { m_host.AddScriptLPS(1); - NotImplemented("llGetFreeMemory"); - return 0; +// NotImplemented("llGetFreeMemory"); + // Make scripts desined for LSO happy + return 16384; } public LSL_Types.LSLString llGetRegionName() diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index 572debc630..27af8a5d71 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs @@ -1689,7 +1689,17 @@ namespace OpenSim.Region.ScriptEngine.Shared static public explicit operator LSLFloat(string s) { - return new LSLFloat(double.Parse(s)); + Regex r = new Regex("^[ ]*-?[0-9]*\\.?[0-9]*[eE]?-?[0-9]*"); + Match m = r.Match(s); + string v = m.Groups[0].Value; + + while (v.Length > 0 && v.Substring(0, 1) == " ") + v = v.Substring(1); + + if (v == String.Empty) + v = "0"; + + return new LSLFloat(double.Parse(v)); } static public implicit operator LSLFloat(double d)