Results 1 to 2 of 2

Thread: java.lang.NullPointerException error

  1. #1
    Senior Member
    Join Date
    Oct 2017
    Posts
    617

    Default java.lang.NullPointerException error

    I am getting a pretty weird error.

    debug log
    DEBUG_20200908.txt

    The CLI message is
    Code:
    Current settings for greygoo:
    greygoo_guildUnlock     = true
    ^unlock your class guild
    greygoo_bakeryHardcoreUnlock     = true
    ^unlock madness bakery if in hardcore
    greygoo_bakerySoftcoreUnlock     = true
    ^unlock madness bakery if not in hardcore
    greygoo_fortuneHardcore     = true
    ^consume fortune cookie and lucky lindy in hardcore
    greygoo_fortuneSoftcore     = true
    ^consume fortune cookie and lucky lindy not in hardcore
    greygoo_fightGoo     = true
    ^fight the goo monsters
    
    You can     make changes to these settings by typing:
    set     [setting_name] = [target]
    
    Unexpected error, debug log     printed.
    Script execution aborted     (java.lang.NullPointerException): (greygoo.ash, line 68)
    


    The line it is referring to is
    Code:
    void greygoo_settings_print()
    {
        //print current settings status
        print();
        print("Current settings for greygoo:", "blue");
        tt_printSetting("greygoo_guildUnlock", "unlock your class guild");
        tt_printSetting("greygoo_bakeryHardcoreUnlock", "unlock madness bakery if in hardcore");
        tt_printSetting("greygoo_bakerySoftcoreUnlock", "unlock madness bakery if not in hardcore");
        tt_printSetting("greygoo_fortuneHardcore", "consume fortune cookie and lucky lindy in hardcore");
        tt_printSetting("greygoo_fortuneSoftcore", "consume fortune cookie and lucky lindy not in hardcore");
        tt_printSetting("greygoo_fightGoo", "fight the goo monsters");
        
        print();
        print("You can make changes to these settings by typing:", "blue");
        print("set [setting_name] = [target]", "blue");
        print();
    }
    line 68 is the final print(); in the above function. with the closing } being line 69

    I got this exact same thing working fine in multiple other scripts. and according to the CLI log you can see that it actually worked because you can see that it skipped a line after "set [setting_name] = [target]"

    That function itself is being called from
    Code:
    void main()
    {
        if(my_path() != "Grey Goo")
        {
            abort("I am not in Grey Goo");
        }
        
        greygoo_settings_defaults();
        
        try
        {
            greygoo_start();
        }
        finally
        {
            greygoo_settings_print();
        }
    }
    and is the last thing that is being run just as the whole thing finishes
    so it is not really doing any harm since it throws that error just as the script is completely done. still pretty weird.

    Also weirdly. I got it 2 days in a row now. and only in one account. other accounts are not having this error.
    Last edited by taltamir; 09-08-2020 at 04:41 AM.
    ttpack = a collection of scripts by taltamir

  2. #2
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,537

    Default

    Revision 20358.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •