Nbacon Posted June 27, 2020 Share Posted June 27, 2020 So I'm working a import system for my project and I ran in to the weirdest bug ever? Explation of the bug: When importing "tool-item" it needs a funtion "item" to run so my pogram reads the file and runs the code in the file. It happens when that code runs it goes and import more code. (no other import does this bug and there are like 50+ files with imports inside imports and they work fine) . Seen in the video below I run it with import tool on top of define tool-item it does not work. But when I swap them they work perfectly fine. Does java have a max number of files open? there are no IOExceptions and all imports that need imports them self work fine. when ran in the termal it works fine. Im at a loss for words and give up unless any of you have any ideas. I have the code that is backing this funtion below. The java code backing this. private void fileShit(File readfile) { try { scemeBot.log("Added " + readfile.getName()); BufferedReader br = null; br = new BufferedReader(new FileReader(readfile)); StringBuilder stringBuilder =new StringBuilder(); String st; while ((st = br.readLine()) != null) { stringBuilder.append(st); } scemeBot.getScheme().eval(stringBuilder.toString()); } catch (IOException e) { scemeBot.log(e); e.printStackTrace(); } } Quote Link to comment Share on other sites More sharing options...
Nbacon Posted June 27, 2020 Author Share Posted June 27, 2020 (edited) found the problem br.readLine() removes \n The line on top has ;; this commented out after it and the removal of the \n makes it 1 line. Edited June 28, 2020 by Nbacon Quote Link to comment Share on other sites More sharing options...
Medusa Posted June 28, 2020 Share Posted June 28, 2020 (edited) nvm. Sorry I had to bash on your project Edited June 28, 2020 by Medusa 1 Quote Link to comment Share on other sites More sharing options...
Nbacon Posted June 29, 2020 Author Share Posted June 29, 2020 12 hours ago, Medusa said: nvm. Sorry I had to bash on your project I saw the ornginal post and I dont think that came off as bashing. Criticism and questions if not malicious should alway be welcome to help everyone understand the goals or misunderstanding. To anwser the orginal question something along the lines "why not just write in java and use the api?" . Because once this not fun, a job, or uninteresting Ill just give up. This project has 100 of goals big and small. I can write java code well (if I understand it case in point this post.) but when puting limitations on myself makes things intresting (think ironman). I believe that programing is problem solving and the expression of ideas. The fun part of programing for me is problem solving and the Laungauge is an extension problem solving. In the case of osbot it is limited to java and If i can write a more expressive Laungauge within the limitions of java (I should). I oringaly wrote this program to take assembly like code but oh god is that shit unreadable. The new Laungauge implements 99% of the osbot api and can do anyhting java can do plus more and the expensive of compution. Quote Link to comment Share on other sites More sharing options...
Medusa Posted June 29, 2020 Share Posted June 29, 2020 14 hours ago, Nbacon said: I saw the ornginal post and I dont think that came off as bashing. Criticism and questions if not malicious should alway be welcome to help everyone understand the goals or misunderstanding. To anwser the orginal question something along the lines "why not just write in java and use the api?" . Because once this not fun, a job, or uninteresting Ill just give up. This project has 100 of goals big and small. I can write java code well (if I understand it case in point this post.) but when puting limitations on myself makes things intresting (think ironman). I believe that programing is problem solving and the expression of ideas. The fun part of programing for me is problem solving and the Laungauge is an extension problem solving. In the case of osbot it is limited to java and If i can write a more expressive Laungauge within the limitions of java (I should). I oringaly wrote this program to take assembly like code but oh god is that shit unreadable. The new Laungauge implements 99% of the osbot api and can do anyhting java can do plus more and the expensive of compution. ye I mean if it's a project then I'm cool with it. I thought you wrote it cuz you thought it'd be easier than using the api Goodluck bro Quote Link to comment Share on other sites More sharing options...