Thread: Where would i add this code?

Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1 Where would i add this code? 
    Registered Member
    Join Date
    Feb 2010
    Posts
    349
    Thanks given
    10
    Thanks received
    5
    Rep Power
    1
    where would i add this code

    Code:
    Mining new Mining = Mining();
    using deltacleaned

    will rep++
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Dec 2009
    Posts
    833
    Thanks given
    8
    Thanks received
    8
    Rep Power
    0
    under the method Main[args

    in server.java
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Feb 2010
    Posts
    349
    Thanks given
    10
    Thanks received
    5
    Rep Power
    1
    i dont have that code in server java
    Reply With Quote  
     

  4. #4  
    Donator

    Ecstasy's Avatar
    Join Date
    Sep 2008
    Age
    29
    Posts
    5,031
    Thanks given
    324
    Thanks received
    596
    Rep Power
    843
    That code makes no sense bro.

    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jan 2010
    Posts
    50
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    So... In you're Mining class you're calling a method called Mining?
    Makes no sense.
    Not allowed
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Feb 2010
    Posts
    349
    Thanks given
    10
    Thanks received
    5
    Rep Power
    1
    The reason being is the because i followed a tut delta++ for mining and i got errors and i was told to add that code in but that didnt work so i dont know where it belongs
    Reply With Quote  
     

  7. #7  
    Registered Member Andrew's Avatar
    Join Date
    Nov 2008
    Posts
    2,890
    Thanks given
    612
    Thanks received
    207
    Rep Power
    551
    umm in server.java ithink not 100% sure
    Reply With Quote  
     

  8. #8  
    Registered Member
    Hunter's Avatar
    Join Date
    Jun 2009
    Age
    33
    Posts
    857
    Thanks given
    3
    Thanks received
    23
    Rep Power
    216
    Well for one that line looks incorrect..

    Code:
    public Mining Mining = new Mining();
    Also, try adding it to client.java or clientHandler.java at the top of the file under:

    Code:
    public class client ....
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Feb 2010
    Posts
    349
    Thanks given
    10
    Thanks received
    5
    Rep Power
    1
    when i add that in i get 25 errors?

    Client.java:11: cannot find symbol
    symbol : class Mining
    location: class Client
    public Mining Mining = new Mining();
    ^
    Client.java:620: cannot find symbol
    symbol : class Mining
    location: class Client
    public static Mining Mining = null;
    ^
    Client.java:11: cannot find symbol
    symbol : class Mining
    location: class Client
    public Mining Mining = new Mining();
    ^
    Client.java:16: cannot find symbol
    symbol : variable Mining
    location: class Server
    for(int i = 0; i < Server.Mining.rocks.length; i
    ++){
    ^
    Client.java:17: cannot find symbol
    symbol : variable Mining
    location: class Server
    if(Server.Mining.rocksTimer[i] > 0)
    ^
    Client.java:18: cannot find symbol
    symbol : variable Mining
    location: class Server
    Server.Mining.rocksTimer[i]--;
    ^
    Client.java:20: cannot find symbol
    symbol : variable Mining
    location: class Server
    if(Server.Mining.rocksTimer[i] == 1){
    ^
    Client.java:21: cannot find symbol
    symbol : variable Mining
    location: class Server
    sM("Replaced rock "+Server.Minin
    g.rocks[i]);
    ^
    Client.java:22: cannot find symbol
    symbol : variable Mining
    location: class Server
    ReplaceObject(Server.Mining.rock
    X[i], Server.Mining.rockY[i], Server.Mining.rocks[i], 0, 10);
    ^
    Client.java:22: cannot find symbol
    symbol : variable Mining
    location: class Server
    ReplaceObject(Server.Mining.rock
    X[i], Server.Mining.rockY[i], Server.Mining.rocks[i], 0, 10);

    ^
    Client.java:22: cannot find symbol
    symbol : variable Mining
    location: class Server
    ReplaceObject(Server.Mining.rock
    X[i], Server.Mining.rockY[i], Server.Mining.rocks[i], 0, 10);

    ^
    Client.java:23: cannot find symbol
    symbol : variable Mining
    location: class Server
    sM(""+Server.Mining.rocks[i]);
    ^
    Client.java:24: cannot find symbol
    symbol : variable Mining
    location: class Server
    Server.Mining.rocks[i] = 0;
    ^
    Client.java:25: cannot find symbol
    symbol : variable Mining
    location: class Server
    Server.Mining.rocksTimer[i] = 0;

    ^
    Client.java:26: cannot find symbol
    symbol : variable Mining
    location: class Server
    Server.Mining.rockX[i] = 0;
    ^
    Client.java:27: cannot find symbol
    symbol : variable Mining
    location: class Server
    Server.Mining.rockY[i] = 0;

    ^
    Client.java:30: cannot find symbol
    symbol: variable playerIsMining
    if(playerIsMining == true){
    ^
    Client.java:32: cannot find symbol
    symbol : variable Mining
    location: class Server
    int test = Misc.random(Server.Mi
    ning.requiredLevel(Server.Mining.objectIDT)*5);

    ^
    Client.java:32: cannot find symbol
    symbol : variable Mining
    location: class Server
    int test = Misc.random(Server.Mi
    ning.requiredLevel(Server.Mining.objectIDT)*5);
    ^
    Client.java:35: cannot find symbol
    symbol : variable Mining
    location: class Server
    Server.Mining.mine(playe
    rId);
    ^
    Client.java:36: cannot find symbol
    symbol: variable playerIsMining
    playerIsMining = false;
    ^
    Client.java:9894: cannot find symbol
    symbol : variable c
    location: class Client
    Server.Mining.preMine(c.playerId, objectX, objectY, obje
    ctID, 40);
    ^
    Client.java:9894: cannot find symbol
    symbol : variable objectY
    location: class Client
    Server.Mining.preMine(c.playerId, objectX, objectY, obje
    ctID, 40);
    ^
    Client.java:9894: cannot find symbol
    symbol : variable objectID
    location: class Client
    Server.Mining.preMine(c.playerId, objectX, objectY, obje
    ctID, 40);
    ^
    Client.java:9894: cannot find symbol
    symbol : variable Mining
    location: class Server
    Server.Mining.preMine(c.playerId, objectX, objectY, obje
    ctID, 40);
    ^
    25 errors
    Press any key to continue . . .
    Reply With Quote  
     

  10. #10  
    Worzox
    Guest
    Add it in the server class.
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •