Advertisement
daixso

Java Errors

May 26th, 2017
592
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.33 KB | None | 0 0
  1. package tech.zwilliams.textrpg.main;
  2. //Author Email: zwilliams@zwilliams.tech
  3. public class Rooms {
  4.     //[id][name][desc][directions]
  5.     private String[][] rooms = {
  6.             {"0", "Slaughtered Hog", "A warm taven full of boisterous patrons.", "N S E W"},
  7.             {"1", "Royal Castle", "A large magnificent castle with intricate statues of former kings and queens.", "W"},
  8.             {"2", "Village Farm", "A farm for the village and castle.\nIn the distance you can see animals roaming the fields.", "N"},
  9.             {"3", "Palace Park", "A huge park with fountains and statues depicting\nthe many feats of the castles knights and rulers.", "E"},
  10.             {"4", "Mages Tower", "An impossibly large tower that seems to touch the clouds.\nYou feel dizzy trying to look up to the top.", "N S E"},
  11.             {"5", "River", "A massive river that feeds the towns water supply.\nIt is also known for having large fish.", "S"},
  12.             {"6", "Mystic Garden", "A beautiful garden with plants you have never seen.\nThe mages use this garden for research and potion supplies.", "W"}
  13.     }; //Syntax error, insert "}" to complete ClassBody
  14.    
  15.     public String getRoomById(id) { //Syntax error, insert "... VariableDeclaratorId" to complete FormalParameterList
  16.         for(int i = 0; i < rooms.length; i++) {
  17.             if(rooms[i][0] == id) {
  18.                 return rooms[i][1];
  19.             }
  20.         }
  21.     }
  22. } //Syntax error on token "}", delete this token
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement