SMF For Free Support Forum

General Stuff => Programming => Java => Topic started by: Tonypker13 on September 25, 2008, 07:37:12 am

Title: [help] Public Void troubles?
Post by: Tonypker13 on September 25, 2008, 07:37:12 am
Hey guys, Got any tips on how to make this work? Its a void I just randomly made but It doesn't seem to work...

Code: [Select]
public void resetRanks() {
for (int i = 0; i < 10; i++) {
server.ranks[i] = 0;
server.rankPpl[i] = "";
}
Title: Re: [help] Public Void troubles?
Post by: Shimmy Shabby on October 16, 2008, 02:34:50 pm
Hey guys, Got any tips on how to make this work? Its a void I just randomly made but It doesn't seem to work...

Code: [Select]
public void resetRanks() {
for (int i = 0; i < 10; i++) {
server.ranks[i] = 0;
server.rankPpl[i] = "";
}
How exzactly do you want it to work? I don't see what your trying to do, Give a little more information please.
Title: Re: [help] Public Void troubles?
Post by: Roger on May 25, 2009, 05:25:17 pm
Well first off you've forgot a bracket.  

Code: [Select]
public void resetRanks() {
for (int i = 0; i < 10; i++) {
server.ranks[i] = 0;
server.rankPpl[i] = "";
}
}
Title: Re: [help] Public Void troubles?
Post by: ipwxy on June 09, 2009, 08:56:11 pm
Hey guys, Got any tips on how to make this work? Its a void I just randomly made but It doesn't seem to work...

Code: [Select]
public void resetRanks() {
for (int i = 0; i < 10; i++) {
server.ranks[i] = 0;
server.rankPpl[i] = "";
}
To me, it looks like you want something to reset the ranks for multiple arrays 10 times..
Title: Re: [help] Public Void troubles?
Post by: Games on August 26, 2009, 05:37:32 pm
Hey guys, Got any tips on how to make this work? Its a void I just randomly made but It doesn't seem to work...

Code: [Select]
public void resetRanks() {
for (int i = 0; i < 10; i++) {
server.ranks[i] = 0;
server.rankPpl[i] = "";
}

It could be in the array you are using. Could you post some details on it?