Skip to content

Commit

Permalink
"null object reference" 💀
Browse files Browse the repository at this point in the history
  • Loading branch information
Joalor64GH authored Jun 19, 2024
1 parent 4d48907 commit d88152c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions source/meta/data/options/SocialCreditState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package meta.data.options;

class SocialCreditState extends MusicBeatState
{
public static var socialCredit:Int = FlxG.save.data.socialCredit;

public static var wentDown:Bool = false;
public static var wentUp:Bool = false;
public static var underZero:Bool = false;
Expand All @@ -26,7 +24,7 @@ class SocialCreditState extends MusicBeatState
titleTxt.screenCenter(X);
add(titleTxt);

var creditTxt:Alphabet = new Alphabet(5, FlxG.height - 444, Std.string(socialCredit), true);
var creditTxt:Alphabet = new Alphabet(5, FlxG.height - 444, Std.string(FlxG.save.data.socialCredit), true);
add(creditTxt);

var creditTxt2:Alphabet = new Alphabet(5, FlxG.height - 400, "Social Credit", false);
Expand Down
2 changes: 1 addition & 1 deletion source/meta/state/InitialState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class InitialState extends FlxState

if (FlxG.save.data != null && FlxG.save.data.fullscreen) FlxG.fullscreen = FlxG.save.data.fullscreen;
if (FlxG.save.data.weekCompleted != null) StoryMenuState.weekCompleted = FlxG.save.data.weekCompleted;
if (FlxG.save.data.socialCredit != null) SocialCreditState.socialCredit = FlxG.save.data.socialCredit;
if (FlxG.save.data.socialCredit == null) FlxG.save.data.socialCredit = 0;

FlxG.mouse.visible = false;
#if desktop
Expand Down

0 comments on commit d88152c

Please sign in to comment.