Computer Science Canada Sockets -.- |
Author: | Donny [ Sun Apr 17, 2011 5:35 pm ] | ||
Post subject: | Sockets -.- | ||
trying to make an online game, but i'm having troubles. I'm not very good at java i've been teaching myself for a few weeks now but this has got me stumped.
I need to be able to access the x3 and y3 outside of the communicate void but it always returns the value as 0, when i put println with x3 outside it just prints 0, how can I make it do anything? i've tried making public int setX(){return this.x3} and such but it still won't work, any suggestions? (it does print the proper x and y values in the console just not when i try outside of the class) |
Author: | Tony [ Sun Apr 17, 2011 5:56 pm ] |
Post subject: | RE:Sockets -.- |
Could be a problem with scope. http://en.wikipedia.org/wiki/Scope_(programming) The code example does not show how/where x3/y3 are created. |
Author: | Donny [ Sun Apr 17, 2011 7:47 pm ] | ||
Post subject: | RE:Sockets -.- | ||
It's in the variables part
|