Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Rog3r

Pages: [1]
1
Tutorials / Re: [PI] Teleport Everyone to X and Y pos
« on: March 12, 2011, 04:04:09 pm »
Code: [Select]
int xpos =  Integer.parseInt(arg[1]);
            int ypos = Integer.parseInt(arg[2]);
            for (int j = 0; j < Server.playerHandler.players.length; j++) {
:fp:
1. xPos.
2. integer.parseInt
3. PlayerHandler.players.length; j++) {
 Why?
1.  Methods are always started with lowercase.
2.  integer = 1 integerSomeThing = 2 (lower to upper)
3.  Useless code, make it cleaned by just using PlayerHandler since you've surely got server imported in top of
4.  You might be thinking, this guy says methods must start with lower case (conventions) why is playerHandler turned into PlayerHandler, well PlayerHandler is a class.
that class.
Good job though,
Works fine.

What are you saying?

Code: [Select]
xPos
That is a variable... you can declare it what ever you want. 

Also,

Code: [Select]
Integer.parseInt
However if that is the case, it's suppose to be Integer.  He is extending to the Integer class (hence class, it's NOT a method).

2
Tutorials / Re: Adding Interfaces To 317 [Non-Renamed]
« on: March 12, 2011, 03:57:26 pm »
Why is this in the tutorial section?

Anyways your problem is because you didn't really declare what Class44 is...

Pages: [1]