Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The code itself:
- public static void UserConfigLoad() {
- try{
- Properties p = new Properties();
- p.load(new FileInputStream("user.ini"));
- myUsername = p.getProperty("Username");
- myPassword = p.getProperty("Password");
- fixed = p.getProperty("FixedScreen");
- }
- catch (Exception e) {
- System.out.println(e);
- }
- }
- public void UserConfigSave() {
- try{
- Properties p = new Properties();
- p.load(new FileInputStream("user.ini"));
- p.put("Username",""+ myUsername +"");
- p.put("Password",""+ myPassword +"");
- p.put("FixedScreen",""+ fixed +"");
- FileOutputStream out = new FileOutputStream("user.ini");
- p.save(out, "/* Server Info Updated */");
- }
- catch (Exception e) {
- System.out.println(e);
- }
- }
- Fixedscreen is a boolean so its either true or false.
- Username is a string.
- Error Compiling:
- client.java:80: non-static variable fixed cannot be referenced from a static con
- text
- fixed = p.getProperty("FixedScreen");
- ^
- client.java:80: incompatible types
- found : java.lang.String
- required: boolean
- fixed = p.getProperty("FixedScreen");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement