Falcon 0 Share Posted March 8, 2022 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. Link to comment Share on other sites More sharing options...
camelCase 231 Share Posted March 8, 2022 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 More sharing options...
Falcon 0 Author Share Posted March 8, 2022 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 More sharing options...
camelCase 231 Share Posted March 8, 2022 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 More sharing options...
Falcon 0 Author Share Posted March 8, 2022 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 More sharing options...
nocheatingcsg 9 Share Posted March 8, 2022 getPlayerEquipment(p) this must be returning null Link to comment Share on other sites More sharing options...
Falcon 0 Author Share Posted March 8, 2022 The question is why it does not return null when hosted on my windows machine but it does on linux. Link to comment Share on other sites More sharing options...
nocheatingcsg 9 Share Posted March 8, 2022 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 More sharing options...
Falcon 0 Author Share Posted March 8, 2022 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.