S1xty
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2712 |
|
|
| 24 Feb 2015 11:28 PM |
while((hash = bob.readLine()) != null){ System.out.println(hash); checkWords(hash, bert); }
This goes through the loop correctly once, after calling checkWords, which returns void.
I have no idea why it isn't calling checkWords for each String hash, but it isn't.
So yeah, if you know why this is happening or how to fix it that would be useful. |
|
|
| Report Abuse |
|
|
S1xty
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2712 |
|
|
| 24 Feb 2015 11:43 PM |
| A response would be nice. I'm sure about half of this forum know java |
|
|
| Report Abuse |
|
|
S1xty
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2712 |
|
| |
|
BowtieMod
|
  |
| Joined: 01 Apr 2013 |
| Total Posts: 804 |
|
| |
|
Seranok
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 11083 |
|
|
| 25 Feb 2015 12:38 AM |
| Is System.out.println(hash); getting executed? |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2015 12:45 AM |
So, I'm assuming bob is a BufferedReader? What's hash and the referenced BufferedReader's content?
|
|
|
| Report Abuse |
|
|
|
| 25 Feb 2015 12:48 AM |
Mkay, so the first part would compile correctly assuming that everything is in order there.
Perhaps showing us your checkWords method would help? |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2015 12:52 AM |
I'm gonna try and fill in the blanks. I can't figure out what bert is nor what checkWords does?
public void checkWords(const char* b, const char* b) { // what does this do? }
// what is bert?
BufferedReader bob = new BufferedReader('c:/bob.txt'); const char *hash = null;
while((hash = bob.readLine()) != null){ System.out.println(hash); checkWords(hash, bert); } |
|
|
| Report Abuse |
|
|
S1xty
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2712 |
|
|
| 25 Feb 2015 03:56 PM |
Nevermind, I fixed it.
I forgot to reset the nested string after each loop, thus causing the inner loop to break immediately after starting |
|
|
| Report Abuse |
|
|
IoIiderp
|
  |
| Joined: 05 Feb 2012 |
| Total Posts: 8613 |
|
|
| 25 Feb 2015 04:21 PM |
| What has this even to with with ROBLOX? |
|
|
| Report Abuse |
|
|
S1xty
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2712 |
|
|
| 25 Feb 2015 11:11 PM |
| It doesn't, and it doesn't need to. |
|
|
| Report Abuse |
|
|
|
| 26 Feb 2015 12:21 AM |
"A response would be nice. I'm sure about half of this forum know java" Half of this forum don't even know Lua well enough to be helping anyone. Or at all. |
|
|
| Report Abuse |
|
|
S1xty
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2712 |
|
|
| 26 Feb 2015 11:32 PM |
| Half of people that are in the responder and not asker section of this forum* |
|
|
| Report Abuse |
|
|