Minor Script Editor error detection fixes

This commit is contained in:
AdAstra-LD
2021-07-17 21:04:55 +02:00
parent 08d5400694
commit fe2cd07de6
4 changed files with 14 additions and 3 deletions

View File

@@ -109,7 +109,7 @@ namespace DSPRE.ROMFiles {
id = ushort.Parse(nameParts[0], NumberStyles.HexNumber, CultureInfo.InvariantCulture);
} catch {
string details;
if (wholeLine.Contains('@') && wholeLine.Contains('#')) {
if (wholeLine.Contains(':') && wholeLine.ContainsNumber()) {
details = "This probably means you forgot to \"End\" the Script or Function above it.";
details += Environment.NewLine + "Please, also note that only Functions can be terminated\nwith \"Return\".";
} else {