Jump to content

tombguy5

Community Member
  • Posts

    216
  • Joined

  • Last visited

  • Donations

    0.00 GBP 

Posts posted by tombguy5

  1. Yes, as far as I know, the US servers were hacked according to Shepard as I was trying to get online to straighten it out. When the servers crashed, we then got problems with the server after the hacking was gone. 

  2. Hey, I am here again stuck with a fairly simple problem but I cant really find a solution myself.

     

    All I need to do is to rename the new image I am converting from.

    (or name it before new image has been converted)

     

    I will post the whole code but will highlight where I need help in.

     

    I will describe what I am trying to do here.

    So I am attempting to convert an image that has been selected to png. Now, the problem is that it's converting but is not making a new .png format. (e.g. I convert image from jpg to png, conversion works but does not paste the new image in the png format, the jpg is still there) I believe this error is because of the names and file explorer doesn't like having 2 of the same names so it does nothing. So I want the program to convert the image but with a different name. I've tried a few ways with no success. Maybe some help here? :)

     

    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    import java.io.File;
    import javax.swing.*;
    import javax.imageio.*;
    import java.awt.image.*;
     
     
     
    /**
     * this class exposes function that tell the main program what this creates
     * and actually creates the new file at the specified location 
     * @author Ryan Berezon
     */
    public class Plug implements File_plug_in
    {
        //returns a string representing the type of operation this class preforms 
        @Override
        public String get_type()
        {
            return "CompressFile";// creates new file 
        }
        
        // returns the button to be displayed for this plug in 
        @Override
        public JButton get_Button(String IconDir)
        {
            //Name of button
            JButton jb = new JButton("Convert 2 PNG");
            //Image for the button
            jb.setIcon(new Icon_imp(IconDir +"image_file.png"));
            return jb;
        } 
     
        @Override
        public boolean operate_on_file(java.util.ArrayList<java.io.File> files,File current_dir) 
        {
            try{
                File file;
                for (int i =0;i < files.size();i++) {
                    file = files.get(i);
                    BufferedImage image = ImageIO.read(file);
                    File output = new File(current_dir.getAbsolutePath()+"\\"+file.getName());   
                    output.createNewFile();
                    if(!ImageIO.write(image, "png", output)){System.out.print("fail to write");}
                    System.out.print(current_dir.getAbsolutePath()+"\\"+file.getName());
                }
            }
            catch(Exception e){
                System.out.print("fail");
                return false;
            }
            return true;
        }
    }

     

     

    That's all! Thanks!

     

    - R. Berezon

  3. If you are referring to when you first connect, you get the AW intro video...

    This is what you need to do...

     

    Step 1: Make Video (preferrably save in a .wav file format)

     

    Step 2: convert to .ogv file format (there are all sorts of converters in armaholic)

     

    Step 3: Put video file in mission folder (C:\Users\NAME\Documents\Arma 3 Alpha - Other Profiles\ProfileName\missions\nameofmission)

     

    Step 4: add this to your init.sqf file in the mission folder (if there isn't an init.sqf, go to notepad and save it as "init.sqf" on all file formats in your mission folder):

    [] spawn {
    scriptName "initMission.hpp: mission start";
    ["name_of_video_file.ogv",0,0,848,480,true] spawn BIS_fnc_titlecard;
    };
     
    Step 5: Now go ingame and open the mission and preview it and it should work!
     
     
    That's it. If you have any questions, please reply to me via Private Message and I will get to you asap :)
    Enjoy!
     
    - R. Berezon
  4. As danne said, using land vehicles to get around the current map doesn't take long at all, maximum 5-10 minute drive time if you stick to optimal road routes.

     

    I do however have a mobile HQ script already pretty much finished, but it needs some work. That's not to say it can't be used yet; I'm fairly confident we can throw it in and see how it works on a test server sometime. I'll put it together and test with danne sometime this weekend.

     

    Ok, but what about when Altis comes out?

    I think we might need that feature. I'm just looking ahead into the future.

  5. Maybe make this feature available when there is less than 10 players on a server?

    e.g. script is active when there are less than 10 players but when that number has been exceeded, the Mobile feature is no longer supported.

    This may make things easier for servers of low population. But that's just an idea.

  6. Hey there ahoyworld community! I am back again with another problem in java and am seeking help.
     
    I am trying to get the image information to convert them to .png image format.
     
    Here is the code and I will bold the section that I need help in.
     
    Thanks in advance!
     

    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    import java.io.File;
    import javax.swing.*;
    import javax.imageio.*;
    import java.awt.image.*;
    import java.io.IOException;
    /**
     * this class exposes function that tell the main program what this creates
     * and actually creates the new file at the specified location 
     * @author Ryan Berezon
     */
    public class Plug implements File_plug_in
    {
        //returns a string representing the type of operation this class preforms 
        @Override
        public String get_type()
        {
            return "CompressFile";// creates new file 
        }
        
        // returns the button to be displayed for this plug in 
        @Override
        public JButton get_Button(String IconDir)
        {
            //Name of button
            JButton jb = new JButton("Convert 2 PNG");
            //Size of button
            jb.setPreferredSize(new java.awt.Dimension(100,50));
            //Image for the button
            jb.setIcon(new Icon_imp(IconDir +"image_file.png"));
            return jb;
        } 
     
        @Override
        public boolean operate_on_file(java.util.ArrayList<java.io.File> files,File current_dir) 
        {
            try{
                // Create a directory; all non-existent ancestor directories are automatically created
                
                File input = (new File(current_dir+"/Converted_Image.jpg"));
                ImageIO.createImageInputStream(files);
                
                File output = (new File(current_dir+"/PNG_Converted_Image.png"));            
                ImageIO.write(ImageIO.read(input), "png", output);
                return true;
                
            }
            catch(Exception e){}//fail
            return false;
            
                    
        }
        
    }
    

     
    If you can help me and maybe give me a few pointers so that I may not get stuck with this again!
     
    Thanks!
     
    R. Berezon

  7. Thank you wok! that was exactly what I needed, thanks! now to continue my project. :) +1 to wok.

    I can probably be able to get a while loop working. It was just trying to set the hardcoded variables for user and password.

    Again, thank you very much!

     

     

     

    I told you, there's help to get in the community. Thanks wok for proving my point. My own java knowledge is quite limited at the moment. But I know a lot of other stuff :-)

     

     

    You are right! Thanks for bringing up that idea. Can't believe that I didn't think about that earlier.

  8. Hey there Ahoyworld community.

    I recently started a final project for my computer class and I chose programming in Java.

     

    I am currently making a Login/Logout application and I just need some help. Here's the code:

     

    package login_out_code;
     
    import java.util.*;
    import java.io.*;
     
    public class Login_out_code {
     
        public static void main(String[] args) {
            
            System.out.println("Hello! Please login to access our system");
     
            System.out.println("Please type the username: ");
            
            String ass;
             try {java.io.BufferedReader butt = new java.io.BufferedReader(new java.io.InputStreamReader(System.in));
     
             ass = butt.readLine();
             }
             catch (Exception e){
                 System.out.println("Invalid Username.");
                int breakp = 43;
                }
             
             
                System.out.println("Now, please type the password: ");
     
                String bacon;
     
                try{java.io.BufferedReader pig = new java.io.BufferedReader(new java.io.InputStreamReader(System.in));
     
                bacon = pig.readLine();
                
                }
                catch(Exception e){
                    System.out.println("Invalid Password, please try again.");
                int breakp = 43;
                }
                
                System.out.println("Welcome to the the system!");
             
             
        }
    }

     

    Logging in works... just without a set username/password. I've worked on this for a couple of hours. I realise the solution may be an easy fix. But i just started learning Java 2½ weeks ago. So I'm new to it.

     

    I want to login with a username and password but right now I can put any username/password and be able to get in. Help please!

    Worked on this for hours!

     

    Thanks!

    - R. Berezon

  9. Welcome Cenosie!

     

    Good to see more players are coming to out I&A Server and our community website for being a part of it AND having an interest in tactical teamplay :D

     

    See you in the Battlefield Cenosie!

×
×
  • Create New...