Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3740937

Browse files
committed
sometimes there is name is not defined
1 parent 2579215 commit 3740937

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

‎GeometryDashAPI/Data/Models/LevelCreatorModel.cs‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ public class LevelCreatorModel
1010
internal string? KeyInDict { get; private set; }
1111
public Plist DataLevel { get; set; }
1212

13-
public string Name
13+
public string? Name
1414
{
15-
get => DataLevel["k2"];
16-
set => DataLevel["k2"] = value;
15+
get => DataLevel.TryGetValue("k2",outvarname)?name:null;
16+
set => DataLevel["k2"] = value!;
1717
}
18+
1819
public string Description
1920
{
2021
get => DataLevel.ContainsKey("k3") ? Encoding.ASCII.GetString(Convert.FromBase64String(DataLevel["k3"])) : "";
@@ -23,11 +24,12 @@ public string Description
2324

2425
public string LevelString => DataLevel.ContainsKey("k4") ? DataLevel["k4"] : Level.DefaultLevelString;
2526

26-
public string AuthorName
27+
public string? AuthorName
2728
{
28-
get => DataLevel["k5"];
29-
set => DataLevel["k5"] = value;
29+
get => DataLevel.TryGetValue("k5",outvarname)?name:null;
30+
set => DataLevel["k5"] = value!;
3031
}
32+
3133
public bool Verified
3234
{
3335
get => DataLevel.ContainsKey("k14") ? DataLevel["k14"] : false;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /