Originally Posted by
TehWorstCoder
o okay, so if i wanted to lets say add a new method of doing a skill; I would have to declare it , but how would you do this like do you just put it anywhere or would it be like and like where would i add the method?
Code:
public boolean theiving = false;
public int thievingr = 0;
public int ftheiveXP;
It's quite simple to understand, you're just over thinking it. Take this as an example:
Code:
class TestClass {
private boolean testMethod() {
if(testVariable > 1) {
return true;
}
return false;
}
}
See where I use the variable "testVariable"? Well this code is going to give you errors because testVariable isn't declared. So now you're going to simply declare it outside of the method, like this.
Code:
class TestClass {
private int testVariable; //this is now declared. This variable doesnt exist
//if you don't declare it
private boolean testMethod() {
if(testVariable > 1) {
return true;
}
return false;
}
}
As to how or where you declare it, that all depends on the code you're working with.