Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Script crashes on linux but works on windows


    Falcon

    Recommended Posts

    Hi, I have encountered a problem where my script is crashing when I try to run it on my linux server but it works on my windows machine. When I run my old non updated script it seems to work but when I compile the same non updated code and run it again on my server it seems to be crashing and it crashes on some place completely different than what I have been adding which was a one line if statement with a change to an embed before it's posted to Discord. Has there been any recent changes to the compiler that might be the reason for this? I should mention that it is 9 months since last time I updated my script so this could have happen a while ago.

    image.png.9006f42dbadce6dceff4dba7ae188f4b.png

    Link to comment
    Share on other sites

    probably has nothing to do with ur compiler, especially becuase this is not a compile time error.

     

    are you grabbing data from somewhere external? my guess would be your server has some network issue not allowing it to grab whatever data you handle in PlayerDataHandling

    Link to comment
    Share on other sites

    36 minutes ago, camalCase said:

    probably has nothing to do with ur compiler, especially becuase this is not a compile time error.

     

    are you grabbing data from somewhere external? my guess would be your server has some network issue not allowing it to grab whatever data you handle in PlayerDataHandling

    I am not fetching anything new which I didn't do before on my old script which works flawlessly and is running right now but when I build and transfer my script to the server now it throws a bunch of errors even tho the code is identical, so there must be happening something inbetween compilation and it getting transfered to my server and ran.

    Link to comment
    Share on other sites

    id be surprised if it was a compiler problem, i guess you can change your compiler and try again, it should be somewhere in project settings theres a drop down menu to select them.

     

    22 minutes ago, DarkFalcon said:

    it throws a bunch of errors even tho the code is identical, so there must be happening something inbetween compilation and it getting transfered to my server and ran

    a bunch of errors or the same error over and over again? whats on line 48 in PlayerDataHandling? i really have no insight that isnt just guesses without seeing the code.

    Link to comment
    Share on other sites

    It's the same error running over and over again and it's a for loop running on line 48, the first line in the snippet is line 48.

    for (Integer armorPieceID : getPlayerEquipment(p)) {
        for (Object keyValue : Objects.requireNonNull(itemJSONData).keySet()) {
            String key = (String) keyValue;
            String armorPieceString = armorPieceID.toString();
            if (itemJSONData.get(key).toString().equals(armorPieceString)) {
                scoutedValuableItem.hasValuableItem = true;
                scoutedValuableItem.valuableItem = new Item(armorPieceID, 0).getName();
                return scoutedValuableItem;
            }
        }
    }
    Link to comment
    Share on other sites

    1 hour ago, DarkFalcon said:

    The question is why it does not return null when hosted on my windows machine but it does on linux.

    We can't really tell without seeing more code. Add some logs or debug it. Figure out where this null comes from.

    Link to comment
    Share on other sites

    I figured out the problem, there was a path misconfiguration from linux vs windows but I was able to resolve it thanks for all the good help :)

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.