fixed a ClientScript bug.
This commit is contained in:
parent
185dd1c5cc
commit
7cd07f7944
|
|
@ -16,6 +16,8 @@ using System.Globalization;
|
|||
public class ClientScript
|
||||
{
|
||||
public static string GetArgsFromTag(string code, string tag, string endtag)
|
||||
{
|
||||
try
|
||||
{
|
||||
int pFrom = code.IndexOf(tag) + tag.Length;
|
||||
int pTo = code.LastIndexOf(endtag);
|
||||
|
|
@ -24,6 +26,11 @@ public class ClientScript
|
|||
|
||||
return result;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return "%donothing%";
|
||||
}
|
||||
}
|
||||
|
||||
public static ScriptGenerator.ScriptType GetTypeFromTag(string tag, string endtag)
|
||||
{
|
||||
|
|
@ -124,6 +131,11 @@ public class ClientScript
|
|||
|
||||
string extractedCode = GetArgsFromTag(code, tag, endtag);
|
||||
|
||||
if (extractedCode.Contains("%donothing%"))
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
string md5dir = GlobalVars.AlreadyHasSecurity != true ? SecurityFuncs.CalculateMD5(Assembly.GetExecutingAssembly().Location) : "";
|
||||
string md5script = GlobalVars.AlreadyHasSecurity != true ? SecurityFuncs.CalculateMD5(GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\content\\scripts\\" + GlobalVars.ScriptName + ".lua") : "";
|
||||
string md5exe = GlobalVars.AlreadyHasSecurity != true ? SecurityFuncs.CalculateMD5(rbxexe) : "";
|
||||
|
|
|
|||
Loading…
Reference in New Issue